{
  "schema": 1,
  "sqlstate": "25P04",
  "condition_name": "transaction_timeout",
  "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"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.postgres.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "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#L3473-L3501"
    },
    {
      "id": "src.config.18.6",
      "kind": "upstream_source",
      "source_role": "official_documentation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/config.sgml",
      "sha256": "ffca322c15315ba670733d6b320f23cbba7374db0d18937298ffc07b58799ef6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10252-L10347",
      "docs_url": "https://www.postgresql.org/docs/18/runtime-config-client.html"
    },
    {
      "id": "doc.monitoring.18.6",
      "kind": "upstream_source",
      "source_role": "official_documentation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/monitoring.sgml",
      "sha256": "06b147f8d966fe46821871703ffcee8a3449cc3f7de5b64b9177f48569fe96f6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L706-L875",
      "docs_url": "https://www.postgresql.org/docs/18/monitoring-stats.html"
    },
    {
      "id": "src.system_views.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/system_views.sql",
      "sha256": "418f4ae7472fe0742e6fbdc7a055581602c5131e082aa6f17e2c7269bf711972",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L604-L605",
      "docs_url": "https://www.postgresql.org/docs/18/view-pg-settings.html"
    },
    {
      "id": "doc.protocol.18.6",
      "kind": "upstream_source",
      "source_role": "official_documentation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/protocol.sgml",
      "sha256": "745339e07ebbc2bb67d98b258e25772ada644ef26011e3cd6b3fcbb435235f89",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/protocol.sgml#L61-L65",
      "docs_url": "https://www.postgresql.org/docs/18/protocol.html"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "25P04 is transaction_timeout in Class 25.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed condition row and macro.",
      "limits": "The locked catalogue first observes this condition in PostgreSQL 17.0; no earlier runtime claim is made."
    },
    {
      "id": "timeout-path",
      "statement": "ProcessInterrupts emits FATAL 25P04 when an explicit or implicitly started transaction exceeds transaction_timeout.",
      "sources": [
        "src.postgres.18.6",
        "src.config.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Trace the timeout interrupt and the fixed configuration documentation.",
      "limits": "The selected PG10 target lacks this setting and is explicitly not applicable; the session is terminated when the path fires."
    },
    {
      "id": "runtime",
      "statement": "The selected PostgreSQL 18.6 case received FATAL 25P04 for the exact backend PID and recovered only by opening a fresh connection; the PG10 case is not applicable.",
      "sources": [
        "runtime",
        "runtime.25P04-batch2c-latest-20260909.latest",
        "runtime.25P04-batch2c-pg10-20260909.pg10"
      ],
      "method": "Match collector records by PID, SQLSTATE, and message, then probe a fresh connection.",
      "limits": "This verifies 18.6 and the PG10 applicability boundary only; it does not claim all intermediate releases without an adjacent source check."
    },
    {
      "id": "diagnosis-observer-boundary",
      "statement": "The fixed monitoring documentation defines pg_stat_activity as one row per server process with current activity, including xact_start and state_change; pg_settings is defined over pg_show_all_settings for the current backend. Capture timeout settings on the timed session itself, because SHOW or pg_settings on an observer connection cannot establish another backend's effective SET value.",
      "sources": [
        "doc.monitoring.18.6",
        "src.system_views.18.6"
      ],
      "method": "Read the fixed monitoring view documentation and system-view definition before writing the observer/session diagnostic split.",
      "limits": "Visibility of pg_stat_activity fields depends on observer privileges; the selected runtime records establish PID/log correlation, not universal monitoring permissions."
    },
    {
      "id": "termination-rollback",
      "statement": "The fixed protocol documentation states that when the backend closes a connection it rolls back any open incomplete transaction before exiting; the driver cannot send a later ROLLBACK on that closed session.",
      "sources": [
        "doc.protocol.18.6"
      ],
      "method": "Read the fixed protocol session-termination rule and align the recovery prose with the FATAL path.",
      "limits": "This establishes server-side rollback on forced connection close; it does not resolve a separate network failure after a client may have sent COMMIT."
    },
    {
      "id": "runtime.version-boundary",
      "statement": "On the fixed availability-boundary registry case, PostgreSQL 16.15 rejects SHOW transaction_timeout with 42704 and remains IDLE, while PostgreSQL 17.11 receives FATAL 25P04 after a 300 ms timeout in an idle-in-transaction session; the original session closes and a fresh connection is IDLE.",
      "sources": [
        "src.config.18.6",
        "doc.protocol.18.6",
        "runtime.25P04-boundary-pg16-20260909.pg16",
        "runtime.25P04-boundary-pg17-20260909.pg17"
      ],
      "method": "Compare the fixed PG16 availability probe and PG17 timeout summaries, including driver diagnostics, both collector severities, PID correlation, termination, and fresh-connection recovery.",
      "limits": "This is a bounded PG16.15/PG17.11 comparison for transaction_timeout. PG16 42704 is not 25P04 coverage; the records do not replace the selected 18.6 run or establish every intermediate minor release."
    }
  ],
  "messages": [
    {
      "id": "fatal",
      "sqlstate": "25P04",
      "primary_template": "terminating connection due to transaction timeout",
      "severity_source": "FATAL",
      "sources": [
        "src.postgres.18.6"
      ],
      "limits": "This is a static FATAL message; the driver may expose or omit SQLSTATE depending on client stack."
    }
  ],
  "usage_evidence": [
    {
      "scope": "transaction-timeout-latest",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime",
        "runtime.25P04-batch2c-latest-20260909.latest"
      ]
    },
    {
      "scope": "pg10-applicability",
      "status": "definition_only",
      "evidence_ids": [
        "runtime.25P04-batch2c-pg10-20260909.pg10"
      ]
    },
    {
      "scope": "source-paths",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "identity",
        "timeout-path"
      ]
    },
    {
      "scope": "transaction-timeout-pg17-boundary",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime.version-boundary",
        "runtime.25P04-boundary-pg17-20260909.pg17"
      ],
      "notes": "The separate PG17.11 boundary case observed FATAL 25P04 with CSV/JSON correlation and fresh-connection recovery; it remains outside the selected base case count."
    },
    {
      "scope": "transaction-timeout-pg16-availability",
      "status": "definition_only",
      "evidence_ids": [
        "runtime.version-boundary",
        "runtime.25P04-boundary-pg16-20260909.pg16"
      ],
      "notes": "PG16.15 returned 42704 for the unavailable setting and remained IDLE; this is availability evidence only, not a 25P04 observation."
    }
  ],
  "runtime": [
    {
      "id": "runtime.25P04-batch2c-latest-20260909.latest",
      "run_id": "25P04-batch2c-latest-20260909",
      "target": "latest",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "status": "passed",
      "case_status": "passed",
      "target_status": "passed",
      "cases": [
        "transaction_timeout"
      ],
      "summary_sha256": "a01d53576c6c15395d88f85039e10d792fbfc72042fd355c14aea06e779fc20f",
      "raw_sha256": "604f0195a1736b0e1cc25d5dc27daaa39647ecaf6dd4815284abe34c98cc3c1e",
      "snippet_registry": {
        "sha256": "d05a26e56716c5c8c178f741843e6b14be87423ec9d1eb1a026ff67a57ce4658"
      },
      "case_manifest": {
        "sha256": "7ec049ed04b847e80c6770278f3dca1b3ef5357d27bada2a2f3e1a98e955e950"
      },
      "observed": {
        "sqlstate": "25P04",
        "severity": "FATAL",
        "primary": "terminating connection due to transaction timeout",
        "backend_pid": 30576,
        "status_before_timeout": "INTRANS",
        "original_connection_closed": true,
        "collector_csv_sqlstate": "25P04",
        "collector_csv_error_severity": "FATAL",
        "collector_json_sqlstate": "25P04",
        "collector_json_error_severity": "FATAL",
        "fresh_connection_probe": 1,
        "fresh_connection_status": "IDLE",
        "recovery_requires_new_connection": true
      }
    },
    {
      "id": "runtime.25P04-batch2c-pg10-20260909.pg10",
      "run_id": "25P04-batch2c-pg10-20260909",
      "target": "pg10",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "status": "not_applicable",
      "case_status": "not_applicable",
      "target_status": "passed",
      "cases": [
        "transaction_timeout"
      ],
      "summary_sha256": "2031245d82e9963d70c7f1b969ebf7a3fc5fd308c646501e9e158a6723dafc05",
      "raw_sha256": "30249f5670f41a2381d3934a9ab40c9e4317e5831c5d3a1941e0a725d5454260",
      "snippet_registry": {
        "sha256": "d05a26e56716c5c8c178f741843e6b14be87423ec9d1eb1a026ff67a57ce4658"
      },
      "case_manifest": {
        "sha256": "7ec049ed04b847e80c6770278f3dca1b3ef5357d27bada2a2f3e1a98e955e950"
      },
      "observed": {
        "server_version_num": 100021,
        "setting": "transaction_timeout",
        "case_status": "not_applicable",
        "preflight": "minimum_version",
        "minimum_version": 170000,
        "setting_probe_skipped": true
      }
    },
    {
      "id": "runtime.25P04-boundary-pg16-20260909.pg16",
      "run_id": "25P04-boundary-pg16-20260909",
      "target": "pg16",
      "server_version": "16.15 (Debian 16.15-1.pgdg13+2)",
      "server_version_num": 160015,
      "status": "not_applicable",
      "case_status": "passed",
      "target_status": "passed",
      "cases": [
        "transaction_timeout_version_boundary"
      ],
      "summary_sha256": "96faef46bcf544732c797ef975add02a6b06684821a4df7e99448aa2355e08d1",
      "raw_sha256": "80fbaa2148e40c6c9239c68a44d4659f485e18aa8dfcdf4451a2496a609a4ff0",
      "snippet_registry": {
        "sha256": "b25b99aa679f058e02229dd8d4ecd1ae4af41d11b19f80199f013da118ef3112"
      },
      "case_manifest": {
        "sha256": "84064c260277d4051404d55d1e912d6f6ebafcea2ef681382cf854a0e79ec7ed"
      },
      "observed": {
        "setting": "transaction_timeout",
        "availability_sqlstate": "42704",
        "availability_severity": "ERROR",
        "availability_primary": "unrecognized configuration parameter \"transaction_timeout\"",
        "status_after_probe": "IDLE",
        "fresh_connection_probe": 1,
        "natural_25P04_observed": false
      },
      "selection_status": "selected_boundary_comparison",
      "limits": "The case passed its availability assertions, but this target does not have the setting. The 42704 probe is retained as a version comparison and is not counted as a 25P04 runtime."
    },
    {
      "id": "runtime.25P04-boundary-pg17-20260909.pg17",
      "run_id": "25P04-boundary-pg17-20260909",
      "target": "pg17",
      "server_version": "17.11 (Debian 17.11-1.pgdg13+2)",
      "server_version_num": 170011,
      "status": "passed",
      "case_status": "passed",
      "target_status": "passed",
      "cases": [
        "transaction_timeout_version_boundary"
      ],
      "summary_sha256": "3342eea9eb7a3ed2dc24f56a321bd648444e074f45f08ec5bc9adc3b2c2dd1f7",
      "raw_sha256": "61e5e0ff62adc6d1744c61a36167ca6e4f754ebbefd905ab1002bf10c2e4cb8f",
      "snippet_registry": {
        "sha256": "b25b99aa679f058e02229dd8d4ecd1ae4af41d11b19f80199f013da118ef3112"
      },
      "case_manifest": {
        "sha256": "84064c260277d4051404d55d1e912d6f6ebafcea2ef681382cf854a0e79ec7ed"
      },
      "observed": {
        "setting": "transaction_timeout",
        "timeout_ms": 300,
        "status_before_timeout": "INTRANS",
        "sqlstate": "25P04",
        "driver_severity": "FATAL",
        "primary": "terminating connection due to transaction timeout",
        "backend_pid": 73,
        "collector_csv_sqlstate": "25P04",
        "collector_csv_severity": "FATAL",
        "collector_json_sqlstate": "25P04",
        "collector_json_severity": "FATAL",
        "original_connection_closed": true,
        "fresh_connection_probe": 1,
        "fresh_connection_status": "IDLE",
        "natural_25P04_observed": true
      },
      "selection_status": "selected_boundary_comparison",
      "limits": "This separate PG17.11 boundary case demonstrates the natural FATAL path and fresh-session recovery; it does not replace or inflate the selected base 18.6 case."
    }
  ]
}
