{
  "schema": 1,
  "sqlstate": "25P04",
  "condition_name": "transaction_timeout",
  "runner": "scripts/verify_cases.py",
  "targets": {
    "latest": {
      "binary": "Homebrew PostgreSQL 18.6",
      "required": true
    },
    "pg10": {
      "image": "postgres:10",
      "required": false
    }
  },
  "cases": [
    {
      "id": "transaction_timeout",
      "versions": [
        "18"
      ],
      "preconditions": [
        "A runner-owned disposable target is provisioned."
      ],
      "trigger": "On a server supporting transaction_timeout, set it, BEGIN, wait, and probe the terminated session.",
      "assertions": [
        "The original session is terminated by the timeout when supported",
        "The collector records FATAL 25P04 for the matching backend PID",
        "A fresh connection can execute SELECT 1",
        "PG10 is explicitly not applicable"
      ],
      "repair": "Use the state-specific recovery documented on the page; do not reuse a terminated connection.",
      "cleanup": "Drop the case schema with an owner connection."
    },
    {
      "id": "transaction_timeout_version_boundary",
      "versions": [
        "16",
        "17"
      ],
      "preconditions": [
        "A disposable PostgreSQL 16 or 17 target"
      ],
      "trigger": "Probe transaction_timeout on PG16; on PG17 set it, BEGIN, wait, and probe the terminated session.",
      "assertions": [
        "PG16 records the actual unsupported-setting diagnostic and recovers",
        "PG17 records exact FATAL 25P04 collector fields and a registry-based fresh connection probe"
      ],
      "repair": "Treat PG16 as unsupported for this setting; for PG17 use a fresh connection after the FATAL and determine unfinished work from the application transaction boundary.",
      "cleanup": "Drop the case schema with an owner connection."
    }
  ],
  "evidence_status": "authored",
  "snippets": [
    {
      "id": "transaction_timeout",
      "case_id": "transaction_timeout",
      "language": "sql",
      "statements": {
        "set_timeout": "SET transaction_timeout = '300ms'",
        "backend_pid": "SELECT pg_backend_pid()",
        "begin": "BEGIN",
        "probe": "SELECT 1"
      }
    },
    {
      "id": "transaction_timeout_version_boundary",
      "case_id": "transaction_timeout_version_boundary",
      "language": "sql",
      "statements": {
        "availability_probe": "SHOW transaction_timeout",
        "set_timeout": "SET transaction_timeout = '300ms'",
        "backend_pid": "SELECT pg_backend_pid()",
        "begin": "BEGIN",
        "probe": "SELECT 1"
      }
    }
  ],
  "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
      },
      "result": {
        "status": "passed",
        "environment": {
          "TimeZone": "Asia/Shanghai",
          "backend_pid": 30553,
          "binary": {
            "bindir": "/opt/homebrew/Cellar/postgresql@18/18.6/bin",
            "pg_config": "/opt/homebrew/bin/pg_config",
            "pg_config_version": "PostgreSQL 18.6 (Homebrew)",
            "postgres": "/opt/homebrew/Cellar/postgresql@18/18.6/bin/postgres"
          },
          "connection_scope": "runner-owned localhost port",
          "current_user": "runner",
          "docker": {},
          "lc_messages": "C",
          "libpq_version": "18.6",
          "locale": "en_US.UTF-8",
          "log_destination": "csvlog,jsonlog",
          "log_error_verbosity": "verbose",
          "log_min_error_statement": "error",
          "log_min_messages": "error",
          "logging_collector": "on",
          "machine": "arm64",
          "max_connections": "100",
          "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
          "psycopg_version": "3.3.5",
          "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
          "server_encoding": "UTF8",
          "server_version": "18.6 (Homebrew)",
          "server_version_num": "180006",
          "target_kind": "latest",
          "wal_level": "logical"
        },
        "cases": [
          {
            "assertions": [
              {
                "expected": "driver observes a closed connection",
                "name": "timeout terminates original session",
                "observed": {
                  "attempts": 1,
                  "closed": true,
                  "error": {
                    "column_name": null,
                    "constraint_name": null,
                    "context": null,
                    "datatype_name": null,
                    "exception_type": "TransactionTimeout",
                    "internal_position": null,
                    "internal_query": null,
                    "message_detail": null,
                    "message_hint": null,
                    "message_primary": "terminating connection due to transaction timeout",
                    "schema_name": null,
                    "severity": "FATAL",
                    "severity_nonlocalized": "FATAL",
                    "source_file": "postgres.c",
                    "source_function": "ProcessInterrupts",
                    "source_line": "3500",
                    "sqlstate": "25P04",
                    "statement_position": null,
                    "table_name": null,
                    "text": "terminating connection due to transaction timeout"
                  }
                },
                "passed": true
              },
              {
                "expected": "INTRANS",
                "name": "timeout began inside transaction",
                "observed": "INTRANS",
                "passed": true
              },
              {
                "expected": {
                  "csv": "25P04",
                  "error_severity": "FATAL",
                  "json": "25P04"
                },
                "name": "collector records SQLSTATE and exact FATAL",
                "observed": {
                  "csv": [
                    {
                      "application_name": "",
                      "backend_type": "client backend",
                      "command_tag": "idle in transaction",
                      "connection_from": "127.0.0.1:54799",
                      "context": "",
                      "database_name": "postgres",
                      "detail": "",
                      "error_severity": "FATAL",
                      "hint": "",
                      "internal_query": "",
                      "internal_query_pos": "",
                      "leader_pid": "",
                      "location": "ProcessInterrupts, postgres.c:3500",
                      "log_time": "2026-09-09 19:29:47.986 CST",
                      "message": "terminating connection due to transaction timeout",
                      "process_id": "30576",
                      "query": "",
                      "query_id": "0",
                      "query_pos": "",
                      "session_id": "6aa1432b.7770",
                      "session_line_num": "1",
                      "session_start_time": "2026-09-09 19:29:47 CST",
                      "sql_state_code": "25P04",
                      "transaction_id": "0",
                      "user_name": "runner",
                      "virtual_transaction_id": "4/4"
                    }
                  ],
                  "json": [
                    {
                      "backend_type": "client backend",
                      "dbname": "postgres",
                      "error_severity": "FATAL",
                      "file_line_num": 3500,
                      "file_name": "postgres.c",
                      "func_name": "ProcessInterrupts",
                      "line_num": 1,
                      "message": "terminating connection due to transaction timeout",
                      "pid": 30576,
                      "ps": "idle in transaction",
                      "query_id": 0,
                      "remote_host": "127.0.0.1",
                      "remote_port": 54799,
                      "session_id": "6aa1432b.7770",
                      "session_start": "2026-09-09 19:29:47 CST",
                      "state_code": "25P04",
                      "timestamp": "2026-09-09 19:29:47.986 CST",
                      "txid": 0,
                      "user": "runner",
                      "vxid": "4/4"
                    }
                  ]
                },
                "passed": true
              },
              {
                "expected": "SELECT 1 and IDLE on a fresh connection",
                "name": "fresh session can recover",
                "observed": {
                  "probe": 1,
                  "status": "IDLE"
                },
                "passed": true
              }
            ],
            "case_id": "transaction_timeout",
            "cleanup": {
              "errors": [],
              "passed": true
            },
            "elapsed_seconds": 0.836,
            "observed": {
              "backend_pid": 30576,
              "collector": {
                "csv": [
                  {
                    "application_name": "",
                    "backend_type": "client backend",
                    "command_tag": "idle in transaction",
                    "connection_from": "127.0.0.1:54799",
                    "context": "",
                    "database_name": "postgres",
                    "detail": "",
                    "error_severity": "FATAL",
                    "hint": "",
                    "internal_query": "",
                    "internal_query_pos": "",
                    "leader_pid": "",
                    "location": "ProcessInterrupts, postgres.c:3500",
                    "log_time": "2026-09-09 19:29:47.986 CST",
                    "message": "terminating connection due to transaction timeout",
                    "process_id": "30576",
                    "query": "",
                    "query_id": "0",
                    "query_pos": "",
                    "session_id": "6aa1432b.7770",
                    "session_line_num": "1",
                    "session_start_time": "2026-09-09 19:29:47 CST",
                    "sql_state_code": "25P04",
                    "transaction_id": "0",
                    "user_name": "runner",
                    "virtual_transaction_id": "4/4"
                  }
                ],
                "json": [
                  {
                    "backend_type": "client backend",
                    "dbname": "postgres",
                    "error_severity": "FATAL",
                    "file_line_num": 3500,
                    "file_name": "postgres.c",
                    "func_name": "ProcessInterrupts",
                    "line_num": 1,
                    "message": "terminating connection due to transaction timeout",
                    "pid": 30576,
                    "ps": "idle in transaction",
                    "query_id": 0,
                    "remote_host": "127.0.0.1",
                    "remote_port": 54799,
                    "session_id": "6aa1432b.7770",
                    "session_start": "2026-09-09 19:29:47 CST",
                    "state_code": "25P04",
                    "timestamp": "2026-09-09 19:29:47.986 CST",
                    "txid": 0,
                    "user": "runner",
                    "vxid": "4/4"
                  }
                ]
              },
              "driver_diagnostic": {
                "column_name": null,
                "constraint_name": null,
                "context": null,
                "datatype_name": null,
                "exception_type": "TransactionTimeout",
                "internal_position": null,
                "internal_query": null,
                "message_detail": null,
                "message_hint": null,
                "message_primary": "terminating connection due to transaction timeout",
                "schema_name": null,
                "severity": "FATAL",
                "severity_nonlocalized": "FATAL",
                "source_file": "postgres.c",
                "source_function": "ProcessInterrupts",
                "source_line": "3500",
                "sqlstate": "25P04",
                "statement_position": null,
                "table_name": null,
                "text": "terminating connection due to transaction timeout"
              },
              "driver_sqlstate": "25P04",
              "fresh_connection_probe": 1,
              "fresh_connection_status": "IDLE",
              "original_connection_closed": true,
              "recovery_requires_new_connection": true,
              "setting": "transaction_timeout",
              "status_before_timeout": "INTRANS",
              "timeout_ms": 300
            },
            "schema": "c25p04_transaction_timeout",
            "status": "passed"
          }
        ]
      }
    },
    {
      "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
      },
      "result": {
        "status": "passed",
        "environment": {
          "TimeZone": "Etc/UTC",
          "backend_pid": 80,
          "binary": {},
          "connection_scope": "runner-owned localhost port",
          "current_user": "postgres",
          "docker": {
            "architecture": "arm64",
            "command": "/usr/local/bin/docker",
            "id": "sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
            "image": "postgres:10",
            "image_created": "2022-06-23T09:11:18.374607054Z",
            "os": "linux",
            "repo_digests": [
              "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc"
            ]
          },
          "lc_messages": "en_US.utf8",
          "libpq_version": "18.6",
          "locale": "en_US.UTF-8",
          "log_destination": "csvlog",
          "log_error_verbosity": "verbose",
          "log_min_error_statement": "error",
          "log_min_messages": "error",
          "logging_collector": "on",
          "machine": "arm64",
          "max_connections": "100",
          "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
          "psycopg_version": "3.3.5",
          "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
          "server_encoding": "UTF8",
          "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
          "server_version_num": "100021",
          "target_kind": "pg10",
          "wal_level": "logical"
        },
        "cases": [
          {
            "assertions": [],
            "case_id": "transaction_timeout",
            "cleanup": {
              "errors": [],
              "passed": true
            },
            "elapsed_seconds": 0.012,
            "observed": {
              "minimum_version": 170000,
              "preflight": "minimum_version",
              "server_version_num": 100021,
              "setting": "transaction_timeout",
              "setting_probe_skipped": true
            },
            "reason": "transaction_timeout is not available on server_version_num 100021; this case requires PostgreSQL 17 or later.",
            "schema": "c25p04_transaction_timeout",
            "status": "not_applicable"
          }
        ]
      }
    },
    {
      "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.",
      "result": {
        "status": "passed",
        "environment": {
          "TimeZone": "Etc/UTC",
          "backend_pid": 71,
          "binary": {},
          "connection_scope": "runner-owned localhost port",
          "current_user": "postgres",
          "docker": {
            "architecture": "arm64",
            "command": "/usr/local/bin/docker",
            "digest": "sha256:f1c3376c26f2609ab9f29f71f824103fe2fcd8ee0346485cb6122a4f93df6f94",
            "id": "sha256:f1c3376c26f2609ab9f29f71f824103fe2fcd8ee0346485cb6122a4f93df6f94",
            "image": "postgres:16.15",
            "image_created": "2026-08-25T00:44:06.393583887Z",
            "image_ref": "postgres@sha256:f1c3376c26f2609ab9f29f71f824103fe2fcd8ee0346485cb6122a4f93df6f94",
            "log_destination": "csvlog,jsonlog",
            "os": "linux",
            "repo_digests": [
              "postgres@sha256:f1c3376c26f2609ab9f29f71f824103fe2fcd8ee0346485cb6122a4f93df6f94"
            ]
          },
          "lc_messages": "en_US.utf8",
          "libpq_version": "18.6",
          "locale": "en_US.UTF-8",
          "log_destination": "csvlog,jsonlog",
          "log_error_verbosity": "verbose",
          "log_min_error_statement": "error",
          "log_min_messages": "error",
          "logging_collector": "on",
          "machine": "arm64",
          "max_connections": "100",
          "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
          "psycopg_version": "3.3.5",
          "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
          "server_encoding": "UTF8",
          "server_version": "16.15 (Debian 16.15-1.pgdg13+2)",
          "server_version_num": "160015",
          "target_kind": "docker-version",
          "wal_level": "logical"
        },
        "cases": [
          {
            "assertions": [
              {
                "expected": "42704",
                "name": "PG16 setting probe returns an unsupported-parameter error",
                "observed": "42704",
                "passed": true
              },
              {
                "expected": "IDLE",
                "name": "PG16 probe leaves the session usable",
                "observed": {
                  "after_probe": "IDLE",
                  "final": "IDLE"
                },
                "passed": true
              },
              {
                "expected": 1,
                "name": "PG16 fresh probe succeeds",
                "observed": 1,
                "passed": true
              }
            ],
            "case_id": "transaction_timeout_version_boundary",
            "cleanup": {
              "errors": [],
              "passed": true
            },
            "elapsed_seconds": 0.02,
            "observed": {
              "availability_probe": {
                "column_name": null,
                "constraint_name": null,
                "context": null,
                "datatype_name": null,
                "exception_type": "UndefinedObject",
                "internal_position": null,
                "internal_query": null,
                "message_detail": null,
                "message_hint": null,
                "message_primary": "unrecognized configuration parameter \"transaction_timeout\"",
                "schema_name": null,
                "severity": "ERROR",
                "severity_nonlocalized": "ERROR",
                "source_file": "guc.c",
                "source_function": "find_option",
                "source_line": "1241",
                "sqlstate": "42704",
                "statement_position": null,
                "table_name": null,
                "text": "unrecognized configuration parameter \"transaction_timeout\""
              },
              "comparison_limit": "PG16 unsupported-setting observation is not 25P04 coverage",
              "final_status": "IDLE",
              "fresh_probe": 1,
              "natural_25P04_observed": false,
              "setting": "transaction_timeout",
              "status_after_probe": "IDLE"
            },
            "schema": "c25p04_transaction_timeout_version_boundary",
            "status": "passed"
          }
        ]
      }
    },
    {
      "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.",
      "result": {
        "status": "passed",
        "environment": {
          "TimeZone": "Etc/UTC",
          "backend_pid": 71,
          "binary": {},
          "connection_scope": "runner-owned localhost port",
          "current_user": "postgres",
          "docker": {
            "architecture": "arm64",
            "command": "/usr/local/bin/docker",
            "digest": "sha256:67f41722b7a8cbdb868a44a4995c846eddfdc2973bccb291ce937dce88ad5675",
            "id": "sha256:67f41722b7a8cbdb868a44a4995c846eddfdc2973bccb291ce937dce88ad5675",
            "image": "postgres:17.11",
            "image_created": "2026-08-25T00:43:42.298298475Z",
            "image_ref": "postgres@sha256:67f41722b7a8cbdb868a44a4995c846eddfdc2973bccb291ce937dce88ad5675",
            "log_destination": "csvlog,jsonlog",
            "os": "linux",
            "repo_digests": [
              "postgres@sha256:67f41722b7a8cbdb868a44a4995c846eddfdc2973bccb291ce937dce88ad5675"
            ]
          },
          "lc_messages": "en_US.utf8",
          "libpq_version": "18.6",
          "locale": "en_US.UTF-8",
          "log_destination": "csvlog,jsonlog",
          "log_error_verbosity": "verbose",
          "log_min_error_statement": "error",
          "log_min_messages": "error",
          "logging_collector": "on",
          "machine": "arm64",
          "max_connections": "100",
          "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
          "psycopg_version": "3.3.5",
          "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
          "server_encoding": "UTF8",
          "server_version": "17.11 (Debian 17.11-1.pgdg13+2)",
          "server_version_num": "170011",
          "target_kind": "docker-version",
          "wal_level": "logical"
        },
        "cases": [
          {
            "assertions": [
              {
                "expected": "driver observes a closed connection",
                "name": "timeout terminates original session",
                "observed": {
                  "attempts": 1,
                  "closed": true,
                  "error": {
                    "column_name": null,
                    "constraint_name": null,
                    "context": null,
                    "datatype_name": null,
                    "exception_type": "TransactionTimeout",
                    "internal_position": null,
                    "internal_query": null,
                    "message_detail": null,
                    "message_hint": null,
                    "message_primary": "terminating connection due to transaction timeout",
                    "schema_name": null,
                    "severity": "FATAL",
                    "severity_nonlocalized": "FATAL",
                    "source_file": "postgres.c",
                    "source_function": "ProcessInterrupts",
                    "source_line": "3460",
                    "sqlstate": "25P04",
                    "statement_position": null,
                    "table_name": null,
                    "text": "terminating connection due to transaction timeout"
                  }
                },
                "passed": true
              },
              {
                "expected": "INTRANS",
                "name": "timeout began inside transaction",
                "observed": "INTRANS",
                "passed": true
              },
              {
                "expected": {
                  "csv": "25P04",
                  "error_severity": "FATAL",
                  "json": "25P04"
                },
                "name": "collector records SQLSTATE and exact FATAL",
                "observed": {
                  "csv": [
                    {
                      "application_name": "",
                      "backend_type": "client backend",
                      "command_tag": "idle in transaction",
                      "connection_from": "172.17.0.1:64740",
                      "context": "",
                      "database_name": "postgres",
                      "detail": "",
                      "error_severity": "FATAL",
                      "hint": "",
                      "internal_query": "",
                      "internal_query_pos": "",
                      "leader_pid": "",
                      "location": "ProcessInterrupts, postgres.c:3460",
                      "log_time": "2026-09-09 12:02:17.551 UTC",
                      "message": "terminating connection due to transaction timeout",
                      "process_id": "73",
                      "query": "",
                      "query_id": "0",
                      "query_pos": "",
                      "session_id": "6aa14ac9.49",
                      "session_line_num": "1",
                      "session_start_time": "2026-09-09 12:02:17 UTC",
                      "sql_state_code": "25P04",
                      "transaction_id": "0",
                      "user_name": "postgres",
                      "virtual_transaction_id": "4/4"
                    }
                  ],
                  "json": [
                    {
                      "backend_type": "client backend",
                      "dbname": "postgres",
                      "error_severity": "FATAL",
                      "file_line_num": 3460,
                      "file_name": "postgres.c",
                      "func_name": "ProcessInterrupts",
                      "line_num": 1,
                      "message": "terminating connection due to transaction timeout",
                      "pid": 73,
                      "ps": "idle in transaction",
                      "query_id": 0,
                      "remote_host": "172.17.0.1",
                      "remote_port": 64740,
                      "session_id": "6aa14ac9.49",
                      "session_start": "2026-09-09 12:02:17 UTC",
                      "state_code": "25P04",
                      "timestamp": "2026-09-09 12:02:17.551 UTC",
                      "txid": 0,
                      "user": "postgres",
                      "vxid": "4/4"
                    }
                  ]
                },
                "passed": true
              },
              {
                "expected": "SELECT 1 and IDLE on a fresh connection",
                "name": "fresh session can recover",
                "observed": {
                  "probe": 1,
                  "status": "IDLE"
                },
                "passed": true
              }
            ],
            "case_id": "transaction_timeout_version_boundary",
            "cleanup": {
              "errors": [],
              "passed": true
            },
            "elapsed_seconds": 0.938,
            "observed": {
              "backend_pid": 73,
              "collector": {
                "csv": [
                  {
                    "application_name": "",
                    "backend_type": "client backend",
                    "command_tag": "idle in transaction",
                    "connection_from": "172.17.0.1:64740",
                    "context": "",
                    "database_name": "postgres",
                    "detail": "",
                    "error_severity": "FATAL",
                    "hint": "",
                    "internal_query": "",
                    "internal_query_pos": "",
                    "leader_pid": "",
                    "location": "ProcessInterrupts, postgres.c:3460",
                    "log_time": "2026-09-09 12:02:17.551 UTC",
                    "message": "terminating connection due to transaction timeout",
                    "process_id": "73",
                    "query": "",
                    "query_id": "0",
                    "query_pos": "",
                    "session_id": "6aa14ac9.49",
                    "session_line_num": "1",
                    "session_start_time": "2026-09-09 12:02:17 UTC",
                    "sql_state_code": "25P04",
                    "transaction_id": "0",
                    "user_name": "postgres",
                    "virtual_transaction_id": "4/4"
                  }
                ],
                "json": [
                  {
                    "backend_type": "client backend",
                    "dbname": "postgres",
                    "error_severity": "FATAL",
                    "file_line_num": 3460,
                    "file_name": "postgres.c",
                    "func_name": "ProcessInterrupts",
                    "line_num": 1,
                    "message": "terminating connection due to transaction timeout",
                    "pid": 73,
                    "ps": "idle in transaction",
                    "query_id": 0,
                    "remote_host": "172.17.0.1",
                    "remote_port": 64740,
                    "session_id": "6aa14ac9.49",
                    "session_start": "2026-09-09 12:02:17 UTC",
                    "state_code": "25P04",
                    "timestamp": "2026-09-09 12:02:17.551 UTC",
                    "txid": 0,
                    "user": "postgres",
                    "vxid": "4/4"
                  }
                ]
              },
              "driver_diagnostic": {
                "column_name": null,
                "constraint_name": null,
                "context": null,
                "datatype_name": null,
                "exception_type": "TransactionTimeout",
                "internal_position": null,
                "internal_query": null,
                "message_detail": null,
                "message_hint": null,
                "message_primary": "terminating connection due to transaction timeout",
                "schema_name": null,
                "severity": "FATAL",
                "severity_nonlocalized": "FATAL",
                "source_file": "postgres.c",
                "source_function": "ProcessInterrupts",
                "source_line": "3460",
                "sqlstate": "25P04",
                "statement_position": null,
                "table_name": null,
                "text": "terminating connection due to transaction timeout"
              },
              "driver_sqlstate": "25P04",
              "fresh_connection_probe": 1,
              "fresh_connection_status": "IDLE",
              "natural_25P04_observed": true,
              "original_connection_closed": true,
              "recovery_requires_new_connection": true,
              "setting": "transaction_timeout",
              "status_before_timeout": "INTRANS",
              "timeout_ms": 300
            },
            "schema": "c25p04_transaction_timeout_version_boundary",
            "status": "passed"
          }
        ]
      }
    }
  ]
}
