{
  "schema": 1,
  "sqlstate": "55P03",
  "condition_name": "lock_not_available",
  "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#L427",
      "lines": "427"
    },
    {
      "id": "src.path.0",
      "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#L5178",
      "lines": "5178-5210"
    },
    {
      "id": "src.path.1",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/namespace.c",
      "sha256": "8c9e6a99e84fa2cec8a9b1de2ecbe3966a13f4ad68c6ccfbfb8134a754d73e56",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/namespace.c#L585",
      "lines": "585-610"
    },
    {
      "id": "src.path.2",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/tcop/postgres.c",
      "sha256": "9fb62275b1badf94d01ab351337b60410cd9b3ab1fe63fa9f23d6d2185a21061",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L3420",
      "lines": "3420-3444"
    },
    {
      "id": "src.path.3",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/lockcmds.c",
      "sha256": "60aba2c1ed1ee527fa1e3c065ee43cff40be3916c7252c95531fd7af5f8c713c",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/lockcmds.c#L130",
      "lines": "130-145"
    },
    {
      "id": "src.path.4",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/vacuum.c",
      "sha256": "bb9071c3813d8dc92b67364a5886aa6139c9ac27e3dc5952e1cb3032b16a0106",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/vacuum.c#L835",
      "lines": "835-880"
    },
    {
      "id": "manifest.55P03",
      "kind": "local_artifact",
      "source_role": "case_manifest",
      "sha256": "66dca33d6dad88ae709af19161d3d1bd6f7cd7f46fa4e549e40845dce7ca830f"
    },
    {
      "id": "snippet-registry.55P03",
      "kind": "local_artifact",
      "source_role": "snippet_registry",
      "sha256": "b38eb524cc6b4080a80b9ea231fe06bd87b27061c810b0b94992bbb18a172f91"
    },
    {
      "id": "runtime.ops-55p03-latest-1.latest",
      "kind": "local_artifact",
      "source_role": "runtime_result",
      "sha256": "576dcff7c4675c49e88c193bcf8c82e833c8c2003896aed9920ffe8b4fb539b2"
    },
    {
      "id": "runtime-raw.ops-55p03-latest-1.latest",
      "kind": "local_artifact",
      "source_role": "runtime_raw",
      "sha256": "a12c4e0f493890f79eb7640b62bf7529fd105106a999383d444992a091ddfb99"
    },
    {
      "id": "runtime.ops-55p03-pg10-1.pg10",
      "kind": "local_artifact",
      "source_role": "runtime_result",
      "sha256": "1b9030d8f33edeff84d946df3d347805e7d41f54048d2eed7f1ebc01fe075d8b"
    },
    {
      "id": "runtime-raw.ops-55p03-pg10-1.pg10",
      "kind": "local_artifact",
      "source_role": "runtime_raw",
      "sha256": "4e45d18e453e859fa01887db2097443e6cdc7bcc83830d14cd97db023ce2817e"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "55P03 is lock_not_available in SQLSTATE Class 55.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read fixed definition."
    },
    {
      "id": "resolved-paths",
      "statement": "The fixed row-lock, relation-lock, LOCK TABLE, lock_timeout, and maintenance paths support the concrete mechanisms and messages described.",
      "sources": [
        "src.path.0",
        "src.path.1",
        "src.path.2",
        "src.path.3",
        "src.path.4"
      ],
      "method": "Read complete fixed source contexts.",
      "limits": "Source confirmation is not natural runtime."
    },
    {
      "id": "maintenance-severity",
      "statement": "VACUUM/ANALYZE emits this SQLSTATE at WARNING for normal maintenance or LOG for verbose autovacuum, while lock and timeout paths use ERROR.",
      "sources": [
        "src.path.4",
        "src.path.2"
      ],
      "method": "Read the selected elevel branches."
    },
    {
      "id": "history",
      "statement": "The locked catalogue records 55P03 from 8.0.0; that boundary does not prove exact implementation introduction.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Use catalogue boundary."
    },
    {
      "id": "runtime.representative-case",
      "statement": "The nowait_row_lock case passed on PostgreSQL 18.6 and 10.21 with SQLSTATE, severity or disconnect outcome, recovery/repair, cleanup, and isolated-target stop assertions.",
      "sources": [
        "runtime.ops-55p03-latest-1.latest",
        "runtime.ops-55p03-pg10-1.pg10",
        "manifest.55P03",
        "snippet-registry.55P03"
      ],
      "method": "Execute the shared registry and inspect the selected summaries.",
      "limits": "This is one bounded mechanism; it does not establish every source branch or business outcome.",
      "runtime": [
        "runtime.ops-55p03-latest-1.latest",
        "runtime.ops-55p03-pg10-1.pg10"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.0",
      "sqlstate": "55P03",
      "primary_template": "could not obtain lock on row in relation \"%s\"",
      "severity_source": "ERROR",
      "sources": [
        "src.path.0"
      ]
    },
    {
      "id": "message.1",
      "sqlstate": "55P03",
      "primary_template": "could not obtain lock on relation \"%s.%s\"",
      "severity_source": "ERROR or DEBUG1 for skip-locked relation lookup",
      "sources": [
        "src.path.1"
      ]
    },
    {
      "id": "message.2",
      "sqlstate": "55P03",
      "primary_template": "canceling statement due to lock timeout",
      "severity_source": "ERROR",
      "sources": [
        "src.path.2"
      ]
    },
    {
      "id": "message.3",
      "sqlstate": "55P03",
      "primary_template": "could not obtain lock on relation \"%s\"",
      "severity_source": "ERROR",
      "sources": [
        "src.path.3"
      ]
    },
    {
      "id": "message.4",
      "sqlstate": "55P03",
      "primary_template": "skipping vacuum of \"%s\" --- lock not available",
      "severity_source": "WARNING for ordinary maintenance or LOG for verbose autovacuum",
      "sources": [
        "src.path.4"
      ]
    },
    {
      "id": "message.5",
      "sqlstate": "55P03",
      "primary_template": "skipping analyze of \"%s\" --- lock not available",
      "severity_source": "WARNING for ordinary maintenance or LOG for verbose autovacuum",
      "sources": [
        "src.path.4"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "resolved-paths"
      ]
    },
    {
      "scope": "selected natural runtime case",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime.representative-case",
        "runtime.ops-55p03-latest-1.latest",
        "runtime.ops-55p03-pg10-1.pg10"
      ]
    }
  ],
  "runtime": [
    {
      "id": "runtime.ops-55p03-latest-1.latest",
      "run_id": "ops-55p03-latest-1",
      "target": "latest",
      "status": "passed",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "summary_sha256": "576dcff7c4675c49e88c193bcf8c82e833c8c2003896aed9920ffe8b4fb539b2",
      "raw_sha256": "a12c4e0f493890f79eb7640b62bf7529fd105106a999383d444992a091ddfb99",
      "case_manifest": {
        "id": "manifest.55P03",
        "kind": "local_artifact",
        "source_role": "case_manifest"
      },
      "snippet_registry": {
        "id": "snippet-registry.55P03",
        "kind": "local_artifact",
        "source_role": "snippet_registry",
        "sha256": "b38eb524cc6b4080a80b9ea231fe06bd87b27061c810b0b94992bbb18a172f91"
      },
      "environment": {
        "server_version": "18.6 (Homebrew)",
        "server_version_num": "180006",
        "current_user": "runner",
        "connection_scope": "runner-owned localhost port",
        "log_destination": "csvlog,jsonlog",
        "log_error_verbosity": "verbose",
        "psycopg_version": "3.3.5",
        "libpq_version": "18.6",
        "target_kind": "latest"
      },
      "cases": [
        "nowait_row_lock"
      ],
      "observed": {
        "connections_autocommit": {
          "blocker": true,
          "contender": true
        },
        "diagnostic": {
          "column_name": null,
          "constraint_name": null,
          "context": null,
          "datatype_name": null,
          "exception_type": "LockNotAvailable",
          "internal_position": null,
          "internal_query": null,
          "message_detail": null,
          "message_hint": null,
          "message_primary": "could not obtain lock on row in relation \"nowait_rows\"",
          "schema_name": null,
          "severity": "ERROR",
          "severity_nonlocalized": "ERROR",
          "source_file": "heapam.c",
          "source_function": "heap_lock_tuple",
          "source_line": "5235",
          "sqlstate": "55P03",
          "statement_position": null,
          "table_name": null,
          "text": "could not obtain lock on row in relation \"nowait_rows\""
        },
        "repair_marker": "repaired",
        "statuses": {
          "blocker_after_lock": "INTRANS",
          "blocker_after_release": "IDLE",
          "contender_after_nowait": "IDLE",
          "contender_after_repair": "IDLE"
        },
        "synchronization": "The blocker acquired SELECT FOR UPDATE before the contender issued SELECT FOR UPDATE NOWAIT; no timing sleep is used.",
        "table": "\"c55p03_nowait_row_lock\".\"nowait_rows\""
      },
      "assertions": [
        {
          "expected": "55P03",
          "name": "55P03 SQLSTATE",
          "observed": "55P03",
          "passed": true
        },
        {
          "expected": "ERROR",
          "name": "55P03 ERROR severity",
          "observed": "ERROR",
          "passed": true
        },
        {
          "expected": "could not obtain lock ... in relation nowait_rows",
          "name": "NOWAIT reports lock-not-available",
          "observed": "could not obtain lock on row in relation \"nowait_rows\"",
          "passed": true
        },
        {
          "expected": "INTRANS",
          "name": "blocker holds the explicit transaction",
          "observed": "INTRANS",
          "passed": true
        },
        {
          "expected": "IDLE",
          "name": "NOWAIT failure leaves contender usable",
          "observed": "IDLE",
          "passed": true
        },
        {
          "expected": "IDLE",
          "name": "rollback releases blocker",
          "observed": "IDLE",
          "passed": true
        },
        {
          "expected": {
            "marker": "repaired",
            "status": "IDLE"
          },
          "name": "same contender retries after release",
          "observed": {
            "status": "IDLE",
            "updated": "repaired",
            "verified": "repaired"
          },
          "passed": true
        }
      ],
      "cleanup": {
        "errors": [],
        "passed": true
      }
    },
    {
      "id": "runtime.ops-55p03-pg10-1.pg10",
      "run_id": "ops-55p03-pg10-1",
      "target": "pg10",
      "status": "passed",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "summary_sha256": "1b9030d8f33edeff84d946df3d347805e7d41f54048d2eed7f1ebc01fe075d8b",
      "raw_sha256": "4e45d18e453e859fa01887db2097443e6cdc7bcc83830d14cd97db023ce2817e",
      "case_manifest": {
        "id": "manifest.55P03",
        "kind": "local_artifact",
        "source_role": "case_manifest"
      },
      "snippet_registry": {
        "id": "snippet-registry.55P03",
        "kind": "local_artifact",
        "source_role": "snippet_registry",
        "sha256": "b38eb524cc6b4080a80b9ea231fe06bd87b27061c810b0b94992bbb18a172f91"
      },
      "environment": {
        "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
        "server_version_num": "100021",
        "current_user": "postgres",
        "connection_scope": "runner-owned localhost port",
        "log_destination": "csvlog",
        "log_error_verbosity": "verbose",
        "psycopg_version": "3.3.5",
        "libpq_version": "18.6",
        "target_kind": "pg10"
      },
      "cases": [
        "nowait_row_lock"
      ],
      "observed": {
        "connections_autocommit": {
          "blocker": true,
          "contender": true
        },
        "diagnostic": {
          "column_name": null,
          "constraint_name": null,
          "context": null,
          "datatype_name": null,
          "exception_type": "LockNotAvailable",
          "internal_position": null,
          "internal_query": null,
          "message_detail": null,
          "message_hint": null,
          "message_primary": "could not obtain lock on row in relation \"nowait_rows\"",
          "schema_name": null,
          "severity": "ERROR",
          "severity_nonlocalized": "ERROR",
          "source_file": "heapam.c",
          "source_function": "heap_lock_tuple",
          "source_line": "5074",
          "sqlstate": "55P03",
          "statement_position": null,
          "table_name": null,
          "text": "could not obtain lock on row in relation \"nowait_rows\""
        },
        "repair_marker": "repaired",
        "statuses": {
          "blocker_after_lock": "INTRANS",
          "blocker_after_release": "IDLE",
          "contender_after_nowait": "IDLE",
          "contender_after_repair": "IDLE"
        },
        "synchronization": "The blocker acquired SELECT FOR UPDATE before the contender issued SELECT FOR UPDATE NOWAIT; no timing sleep is used.",
        "table": "\"c55p03_nowait_row_lock\".\"nowait_rows\""
      },
      "assertions": [
        {
          "expected": "55P03",
          "name": "55P03 SQLSTATE",
          "observed": "55P03",
          "passed": true
        },
        {
          "expected": "ERROR",
          "name": "55P03 ERROR severity",
          "observed": "ERROR",
          "passed": true
        },
        {
          "expected": "could not obtain lock ... in relation nowait_rows",
          "name": "NOWAIT reports lock-not-available",
          "observed": "could not obtain lock on row in relation \"nowait_rows\"",
          "passed": true
        },
        {
          "expected": "INTRANS",
          "name": "blocker holds the explicit transaction",
          "observed": "INTRANS",
          "passed": true
        },
        {
          "expected": "IDLE",
          "name": "NOWAIT failure leaves contender usable",
          "observed": "IDLE",
          "passed": true
        },
        {
          "expected": "IDLE",
          "name": "rollback releases blocker",
          "observed": "IDLE",
          "passed": true
        },
        {
          "expected": {
            "marker": "repaired",
            "status": "IDLE"
          },
          "name": "same contender retries after release",
          "observed": {
            "status": "IDLE",
            "updated": "repaired",
            "verified": "repaired"
          },
          "passed": true
        }
      ],
      "cleanup": {
        "errors": [],
        "passed": true
      }
    }
  ]
}
