{
  "schema": 1,
  "sqlstate": "XX001",
  "condition_name": "data_corrupted",
  "sources": [
    {
      "id": "src.errcodes.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L500",
      "lines": "500"
    },
    {
      "id": "src.path.0",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/access/common/toast_compression.c",
      "sha256": "87d3c4337f09c991f5baefdbed6247fb93095c99f346ebb3622b8f5ee10e0064",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/common/toast_compression.c#L90",
      "lines": "90-100"
    },
    {
      "id": "src.path.1",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/access/heap/heapam.c",
      "sha256": "57e3396476fc5d269bd2944b549a671f2699bf8ed43668e661090548ca206a16",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/heapam.c#L6983",
      "lines": "6983-7042"
    },
    {
      "id": "src.path.2",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/amcheck/verify_nbtree.c",
      "sha256": "a59ae7540a990e5a70e8eb9cedbcad7c62e3e86b1ad426142c8931ee188b752d",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/amcheck/verify_nbtree.c#L2760",
      "lines": "2760-2818"
    },
    {
      "id": "src.path.3",
      "kind": "upstream_source",
      "source_role": "amcheck_entry_points",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/amcheck/verify_nbtree.c",
      "sha256": "a59ae7540a990e5a70e8eb9cedbcad7c62e3e86b1ad426142c8931ee188b752d",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/amcheck/verify_nbtree.c#L252",
      "lines": "252-305"
    },
    {
      "id": "src.path.4",
      "kind": "upstream_source",
      "source_role": "amcheck_lock_mode_mapping",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/amcheck/verify_common.c",
      "sha256": "8e591fc7b73760af0bea05987093064087b26f6b80856228d95f7c0d8e2d266a",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/amcheck/verify_common.c#L60",
      "lines": "60-149"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "XX001 is data_corrupted in SQLSTATE Class XX.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read locked definition snapshot."
    },
    {
      "id": "resolved-paths",
      "statement": "Fixed source paths cover PGLZ decompression corruption, MultiXact/XID freeze invariants, and the amcheck heapallindexed mismatch; bt_index_check uses AccessShareLock, while bt_index_parent_check uses ShareLock and causes the callback readonly flag that suppresses the parent-check hint.",
      "sources": [
        "src.path.0",
        "src.path.1",
        "src.path.2",
        "src.path.3",
        "src.path.4"
      ],
      "method": "Read complete fixed integrity-check contexts, amcheck entry points, and the lock-mode-to-readonly mapping.",
      "limits": "Source confirmation is not natural runtime and does not identify a particular incident root cause."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records XX001 from 7.4; it does not prove the exact introduction rationale.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use locked catalogue boundary."
    }
  ],
  "messages": [
    {
      "id": "message.0",
      "sqlstate": "XX001",
      "primary_template": "compressed pglz data is corrupt",
      "severity_source": "ERROR",
      "sources": [
        "src.path.0"
      ]
    },
    {
      "id": "message.1",
      "sqlstate": "XX001",
      "primary_template": "found multixact %u from before relminmxid %u",
      "severity_source": "ERROR",
      "sources": [
        "src.path.1"
      ]
    },
    {
      "id": "message.2",
      "sqlstate": "XX001",
      "primary_template": "multixact %u from before multi freeze cutoff %u found to be still running",
      "severity_source": "ERROR",
      "sources": [
        "src.path.1"
      ]
    },
    {
      "id": "message.3",
      "sqlstate": "XX001",
      "primary_template": "multixact %u contains update XID %u from before relfrozenxid %u",
      "severity_source": "ERROR",
      "sources": [
        "src.path.1"
      ]
    },
    {
      "id": "message.4",
      "sqlstate": "XX001",
      "primary_template": "multixact %u contains committed update XID %u from before removable cutoff %u",
      "severity_source": "ERROR",
      "sources": [
        "src.path.1"
      ]
    },
    {
      "id": "message.5",
      "sqlstate": "XX001",
      "primary_template": "heap tuple (%u,%u) from table \"%s\" lacks matching index tuple within index \"%s\"",
      "severity_source": "ERROR",
      "sources": [
        "src.path.2",
        "src.path.3",
        "src.path.4"
      ],
      "hint_template": "Retrying verification using the function bt_index_parent_check() might provide a more specific error.",
      "hint_condition": "bt_index_check (AccessShareLock; callback readonly=false)",
      "context": "bt_index_parent_check uses ShareLock and callback readonly=true, so this hint is not appended there."
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "resolved-paths"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "resolved-paths"
      ]
    }
  ],
  "runtime": []
}
