{"Entry":{"collection":"sqlstate","key":"25P03","name":"25P03","aliases":[],"metadata":{"aliases":[],"case_count":1,"class_code":"25","condition_name":"idle_in_transaction_session_timeout","condition_names":["idle_in_transaction_session_timeout"],"content_hash":"a421f5280b7f40de948ace63c6a2497615235af11d4f50146427c81cb753f086","depth":"full","editorial_review":"reviewed","evidence_tier":"observed_runtime","imported_at":"2026-09-30T17:45:27.296834+08:00","introduced":null,"known_present_by":"9.6.0","macros":["ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT"],"name_zh":"事务中空闲会话超时","present_in":["9.6","10","11","12","13","14","15","16","17","18","19"],"preview_in":["19"],"primary_macro":"ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT","removed":null,"runtime_verification":"passed","severity_classes":["E"],"snippet_count":1,"source_rev":"english-manuals:1db52d3da9a813f5a4ad9099aae2dc662e759b68aa365475726e0f99ee98adc1","sqlstate":"25P03","status":"active","summary_zh":"会话在开放事务中空闲超时，被服务器终止。"}},"Definition":{"Collection":"sqlstate","Key":"25P03","SourceDatabase":"center","Version":"18","SourceTable":"sqlstate","SourceKey":"25P03","SourceRevision":"english-manuals:1db52d3da9a813f5a4ad9099aae2dc662e759b68aa365475726e0f99ee98adc1","Facts":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"},"lang":"en","sqlstate":"25P03"},"ManualEvidence":{"doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"sqlstate","Key":"25P03","SourceDatabase":"center","Version":"","Locale":"zh-Hans","Title":"25P03 — 事务中空闲会话超时（idle_in_transaction_session_timeout）","Summary":"会话在开放事务中空闲超时，被服务器终止。","BodyHTML":"\u003ch1\u003e25P03 — 事务中空闲会话超时（idle_in_transaction_session_timeout）\u003c/h1\u003e\n\u003ch2\u003e速览 {#at-a-glance}\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003e25P03\u003c/code\u003e 是终止会话的 FATAL 条件。当会话在开放事务中等待客户端下一条查询的时间超过有效 \u003ccode\u003eidle_in_transaction_session_timeout\u003c/code\u003e 时触发。选定案例使用 300 ms 作为测试触发值，不是生产建议。\u003c/p\u003e\n\u003ch2\u003e含义 {#meaning}\u003c/h2\u003e\n\u003cp\u003e该超时防止会话在等待客户端期间长期持有开放事务，从而持有锁并延迟清理。它作用于事务中的空闲等待，包括 \u003ccode\u003eidle in transaction\u003c/code\u003e 和 \u003ccode\u003eidle in transaction (aborted)\u003c/code\u003e 状态，不是正在执行的语句；\u003ccode\u003estatement_timeout\u003c/code\u003e 取消单条语句，而支持该设置的版本中 \u003ccode\u003etransaction_timeout\u003c/code\u003e 限制整个事务生命周期。选定运行只覆盖未中止的 \u003ccode\u003eINTRANS\u003c/code\u003e 路径。\u003c/p\u003e\n\u003ch2\u003e诊断 {#diagnosis}\u003c/h2\u003e\n\u003cp\u003e会话消失前，先在该目标会话自身检查有效的 \u003ccode\u003eSHOW idle_in_transaction_session_timeout\u003c/code\u003e（或对应的 \u003ccode\u003epg_settings\u003c/code\u003e 行）。控制连接上的 \u003ccode\u003eSHOW\u003c/code\u003e 或 \u003ccode\u003epg_settings\u003c/code\u003e 反映的是观察者后端，不能用来确认另一个会话实际通过 \u003ccode\u003eSET\u003c/code\u003e 得到的值。再从控制连接查看 \u003ccode\u003epg_stat_activity\u003c/code\u003e 中 \u003ccode\u003epid\u003c/code\u003e、\u003ccode\u003eusename\u003c/code\u003e、\u003ccode\u003eapplication_name\u003c/code\u003e、\u003ccode\u003eclient_addr\u003c/code\u003e、\u003ccode\u003estate\u003c/code\u003e、\u003ccode\u003exact_start\u003c/code\u003e、\u003ccode\u003estate_change\u003c/code\u003e、\u003ccode\u003equery_start\u003c/code\u003e、\u003ccode\u003equery\u003c/code\u003e 等字段，并筛选 \u003ccode\u003estate IN (\u0026#39;idle in transaction\u0026#39;, \u0026#39;idle in transaction (aborted)\u0026#39;)\u003c/code\u003e。若状态已经中止，应把更早的根错误和 25P02 作为独立诊断保留；选定运行是未中止的 \u003ccode\u003eINTRANS\u003c/code\u003e 路径。这些字段可定位连接池或应用路径以及空闲时长，但观察者权限可能限制可见内容。再按 backend PID、SQLSTATE、\u003ccode\u003eerror_severity = FATAL\u003c/code\u003e 和精确报文关联 FATAL 记录。选定的 psycopg/libpq 栈在驱动诊断和 CSV 日志中都暴露了 25P03；PG18 还提供 JSON 日志。原连接已关闭，不能在其上用 \u003ccode\u003eROLLBACK\u003c/code\u003e 修复事务。\u003c/p\u003e\n\u003ch2\u003e处理 {#response}\u003c/h2\u003e\n\u003cp\u003e把原会话视为已消失：从连接池移除它，重连后再判断能否重试幂等工作。要避免再次发生，应在连接归还连接池前提交或回滚，并修复留下开放事务的应用路径。不要为了压制错误而降低该超时；更短的值会更容易触发终止。可把有效值设在合法空闲时长之上；只有部署明确接受锁和清理风险时才设为 \u003ccode\u003e0\u003c/code\u003e。服务器关闭该会话时会在退出前回滚开放且尚未完成的事务；死亡连接不能再接收 \u003ccode\u003eROLLBACK\u003c/code\u003e。对已终止会话中已知未提交的事务，不能通过该连接恢复。若是另一种网络故障发生在客户端可能已发送 \u003ccode\u003eCOMMIT\u003c/code\u003e 之后，应从新连接对账业务结果再重试；并非每个 25P03 FATAL 都意味着这种不确定性。\u003c/p\u003e\n\u003ch2\u003eFATAL 报文 {#messages}\u003c/h2\u003e\n\u003cp\u003e服务器源码固定报出 \u003ccode\u003eterminating connection due to idle-in-transaction timeout\u003c/code\u003e，严重级别为 \u003ccode\u003eFATAL\u003c/code\u003e；原连接会被终止。\u003c/p\u003e\n\u003ch2\u003e实测诊断 {#observed}\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003e18.6 (Homebrew) / latest\u003c/code\u003e：FATAL SQLSTATE \u003ccode\u003e25P03\u003c/code\u003e；主报文 \u003ccode\u003eterminating connection due to idle-in-transaction timeout\u003c/code\u003e；backend PID \u003ccode\u003e26447\u003c/code\u003e；原连接已关闭 \u003ccode\u003eTrue\u003c/code\u003e；CSV 日志 \u003ccode\u003e25P03\u003c/code\u003e；JSON 日志 \u003ccode\u003e25P03\u003c/code\u003e；新连接探测 \u003ccode\u003e1\u003c/code\u003e。\n\u003ccode\u003e10.21 (Debian 10.21-1.pgdg90+1) / pg10\u003c/code\u003e：FATAL SQLSTATE \u003ccode\u003e25P03\u003c/code\u003e；主报文 \u003ccode\u003eterminating connection due to idle-in-transaction timeout\u003c/code\u003e；backend PID \u003ccode\u003e81\u003c/code\u003e；原连接已关闭 \u003ccode\u003eTrue\u003c/code\u003e；CSV 日志 \u003ccode\u003e25P03\u003c/code\u003e；JSON 日志 \u003ccode\u003e不适用\u003c/code\u003e；新连接探测 \u003ccode\u003e1\u003c/code\u003e。\u003c/p\u003e\n\u003ch2\u003e代表案例 {#case}\u003c/h2\u003e\n\u003cp\u003e下列 SQL 片段不是一次性粘贴脚本：在测试连接上执行设置、PID 和 \u003ccode\u003eBEGIN\u003c/code\u003e 后停止发送查询，由独立观察连接或日志收集器等待 FATAL；原连接终止后，另开新连接执行最后的探测。运行器从共享语句清单（registry）读取这些语句，完整断言、日志收集器关联、环境和清理见 \u003ca href=\"#cases\" rel=\"nofollow\"\u003e案例导出\u003c/a\u003e。\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e-- set_timeout\nSET idle_in_transaction_session_timeout = \u0026#39;300ms\u0026#39;;\n-- backend_pid\nSELECT pg_backend_pid();\n-- begin\nBEGIN;\n-- probe\nSELECT 1;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e上述片段的 SQLSTATE、诊断、状态和修复断言来自共享语句清单（registry）（SHA-256 \u003ccode\u003e95fd079c8bca77c6e3ffc398e404a218e4f810e5fa36e30127cbc6470a6d6eb2\u003c/code\u003e）；\u003ca href=\"#sources\" rel=\"nofollow\"\u003e结构化证据\u003c/a\u003e。\u003c/p\u003e\n\u003cp\u003e作者证据 ID：\u003ccode\u003eidentity\u003c/code\u003e, \u003ccode\u003etimeout-path\u003c/code\u003e, \u003ccode\u003eruntime\u003c/code\u003e。选定运行记录：\u003ccode\u003eruntime.25P03-batch2c-latest-20260909.latest\u003c/code\u003e, \u003ccode\u003eruntime.25P03-batch2c-pg10-20260909.pg10\u003c/code\u003e。\u003c/p\u003e\n\u003ch2\u003e版本与边界 {#versions}\u003c/h2\u003e\n\u003cp\u003e选定的 300 ms 终止案例在 PostgreSQL 18.6 与 10.21 通过。PG18 按配置提供 CSV 和 JSON 日志记录；PG10 只有 CSV。两个目标的新连接都成功执行 \u003ccode\u003eSELECT 1\u003c/code\u003e。超时值取决于部署，本案例不规定生产值。\u003c/p\u003e\n\u003ch2\u003e相关 {#related}\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"/wiki/sqlstate/25P04/\" rel=\"nofollow\"\u003e25P04 事务超时\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/25006/\" rel=\"nofollow\"\u003e25006 只读 SQL 事务\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/57014/\" rel=\"nofollow\"\u003e57014 查询取消\u003c/a\u003e。\u003c/p\u003e\n\u003ch2\u003e来源 {#sources}\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt\" rel=\"nofollow\"\u003e\u003ccode\u003esrc.errcodes.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003esrc.calls.REL_18_6\u003c/code\u003e — \u003ccode\u003eraw/calls/REL_18_6.jsonl\u003c/code\u003e (SHA-256 \u003ccode\u003e9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L3473-L3501\" rel=\"nofollow\"\u003e\u003ccode\u003esrc.postgres.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e9fb62275b1badf94d01ab351337b60410cd9b3ab1fe63fa9f23d6d2185a21061\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10252-L10347\" rel=\"nofollow\"\u003e\u003ccode\u003esrc.config.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003effca322c15315ba670733d6b320f23cbba7374db0d18937298ffc07b58799ef6\u003c/code\u003e) · \u003ca href=\"/docs/18/runtime-config-client.html\" rel=\"nofollow\"\u003eofficial documentation\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L706-L875\" rel=\"nofollow\"\u003e\u003ccode\u003edoc.monitoring.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e06b147f8d966fe46821871703ffcee8a3449cc3f7de5b64b9177f48569fe96f6\u003c/code\u003e) · \u003ca href=\"/docs/18/monitoring-stats.html\" rel=\"nofollow\"\u003e官方监控文档\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L604-L605\" rel=\"nofollow\"\u003e\u003ccode\u003esrc.system_views.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e418f4ae7472fe0742e6fbdc7a055581602c5131e082aa6f17e2c7269bf711972\u003c/code\u003e) · \u003ca href=\"/docs/18/view-pg-settings.html\" rel=\"nofollow\"\u003e官方 \u003ccode\u003epg_settings\u003c/code\u003e 文档\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/protocol.sgml#L61-L65\" rel=\"nofollow\"\u003e\u003ccode\u003edoc.protocol.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e745339e07ebbc2bb67d98b258e25772ada644ef26011e3cd6b3fcbb435235f89\u003c/code\u003e) · \u003ca href=\"/docs/18/protocol.html\" rel=\"nofollow\"\u003e官方协议文档\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","SourceRevision":"english-manuals:1db52d3da9a813f5a4ad9099aae2dc662e759b68aa365475726e0f99ee98adc1","ContentHash":"f8684389a685d4bc770ac0701a2715a6993fe6448e4dfea022d25a52ec8c5361","Payload":{"body_md":"# 25P03 — 事务中空闲会话超时（idle_in_transaction_session_timeout）\n\n## 速览 {#at-a-glance}\n\n`25P03` 是终止会话的 FATAL 条件。当会话在开放事务中等待客户端下一条查询的时间超过有效 `idle_in_transaction_session_timeout` 时触发。选定案例使用 300 ms 作为测试触发值，不是生产建议。\n\n\n## 含义 {#meaning}\n\n该超时防止会话在等待客户端期间长期持有开放事务，从而持有锁并延迟清理。它作用于事务中的空闲等待，包括 `idle in transaction` 和 `idle in transaction (aborted)` 状态，不是正在执行的语句；`statement_timeout` 取消单条语句，而支持该设置的版本中 `transaction_timeout` 限制整个事务生命周期。选定运行只覆盖未中止的 `INTRANS` 路径。\n\n## 诊断 {#diagnosis}\n\n会话消失前，先在该目标会话自身检查有效的 `SHOW idle_in_transaction_session_timeout`（或对应的 `pg_settings` 行）。控制连接上的 `SHOW` 或 `pg_settings` 反映的是观察者后端，不能用来确认另一个会话实际通过 `SET` 得到的值。再从控制连接查看 `pg_stat_activity` 中 `pid`、`usename`、`application_name`、`client_addr`、`state`、`xact_start`、`state_change`、`query_start`、`query` 等字段，并筛选 `state IN ('idle in transaction', 'idle in transaction (aborted)')`。若状态已经中止，应把更早的根错误和 25P02 作为独立诊断保留；选定运行是未中止的 `INTRANS` 路径。这些字段可定位连接池或应用路径以及空闲时长，但观察者权限可能限制可见内容。再按 backend PID、SQLSTATE、`error_severity = FATAL` 和精确报文关联 FATAL 记录。选定的 psycopg/libpq 栈在驱动诊断和 CSV 日志中都暴露了 25P03；PG18 还提供 JSON 日志。原连接已关闭，不能在其上用 `ROLLBACK` 修复事务。\n\n## 处理 {#response}\n\n把原会话视为已消失：从连接池移除它，重连后再判断能否重试幂等工作。要避免再次发生，应在连接归还连接池前提交或回滚，并修复留下开放事务的应用路径。不要为了压制错误而降低该超时；更短的值会更容易触发终止。可把有效值设在合法空闲时长之上；只有部署明确接受锁和清理风险时才设为 `0`。服务器关闭该会话时会在退出前回滚开放且尚未完成的事务；死亡连接不能再接收 `ROLLBACK`。对已终止会话中已知未提交的事务，不能通过该连接恢复。若是另一种网络故障发生在客户端可能已发送 `COMMIT` 之后，应从新连接对账业务结果再重试；并非每个 25P03 FATAL 都意味着这种不确定性。\n\n## FATAL 报文 {#messages}\n\n服务器源码固定报出 `terminating connection due to idle-in-transaction timeout`，严重级别为 `FATAL`；原连接会被终止。\n\n## 实测诊断 {#observed}\n\n`18.6 (Homebrew) / latest`：FATAL SQLSTATE `25P03`；主报文 `terminating connection due to idle-in-transaction timeout`；backend PID `26447`；原连接已关闭 `True`；CSV 日志 `25P03`；JSON 日志 `25P03`；新连接探测 `1`。\n`10.21 (Debian 10.21-1.pgdg90+1) / pg10`：FATAL SQLSTATE `25P03`；主报文 `terminating connection due to idle-in-transaction timeout`；backend PID `81`；原连接已关闭 `True`；CSV 日志 `25P03`；JSON 日志 `不适用`；新连接探测 `1`。\n\n## 代表案例 {#case}\n\n下列 SQL 片段不是一次性粘贴脚本：在测试连接上执行设置、PID 和 `BEGIN` 后停止发送查询，由独立观察连接或日志收集器等待 FATAL；原连接终止后，另开新连接执行最后的探测。运行器从共享语句清单（registry）读取这些语句，完整断言、日志收集器关联、环境和清理见 [案例导出](#cases)。\n\n```sql\n-- set_timeout\nSET idle_in_transaction_session_timeout = '300ms';\n-- backend_pid\nSELECT pg_backend_pid();\n-- begin\nBEGIN;\n-- probe\nSELECT 1;\n```\n\n上述片段的 SQLSTATE、诊断、状态和修复断言来自共享语句清单（registry）（SHA-256 `95fd079c8bca77c6e3ffc398e404a218e4f810e5fa36e30127cbc6470a6d6eb2`）；[结构化证据](#sources)。\n\n作者证据 ID：`identity`, `timeout-path`, `runtime`。选定运行记录：`runtime.25P03-batch2c-latest-20260909.latest`, `runtime.25P03-batch2c-pg10-20260909.pg10`。\n## 版本与边界 {#versions}\n\n选定的 300 ms 终止案例在 PostgreSQL 18.6 与 10.21 通过。PG18 按配置提供 CSV 和 JSON 日志记录；PG10 只有 CSV。两个目标的新连接都成功执行 `SELECT 1`。超时值取决于部署，本案例不规定生产值。\n\n## 相关 {#related}\n\n[25P04 事务超时](/wiki/sqlstate/25P04/)、[25006 只读 SQL 事务](/wiki/sqlstate/25006/)、[57014 查询取消](/wiki/sqlstate/57014/)。\n\n## 来源 {#sources}\n\n- [`src.errcodes.18.6`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt) (SHA-256 `6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba`)\n- `src.calls.REL_18_6` — `raw/calls/REL_18_6.jsonl` (SHA-256 `9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf`)\n- [`src.postgres.18.6`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L3473-L3501) (SHA-256 `9fb62275b1badf94d01ab351337b60410cd9b3ab1fe63fa9f23d6d2185a21061`)\n- [`src.config.18.6`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10252-L10347) (SHA-256 `ffca322c15315ba670733d6b320f23cbba7374db0d18937298ffc07b58799ef6`) · [official documentation](/docs/18/runtime-config-client.html)\n- [`doc.monitoring.18.6`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L706-L875) (SHA-256 `06b147f8d966fe46821871703ffcee8a3449cc3f7de5b64b9177f48569fe96f6`) · [官方监控文档](/docs/18/monitoring-stats.html)\n- [`src.system_views.18.6`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L604-L605) (SHA-256 `418f4ae7472fe0742e6fbdc7a055581602c5131e082aa6f17e2c7269bf711972`) · [官方 `pg_settings` 文档](/docs/18/view-pg-settings.html)\n- [`doc.protocol.18.6`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/protocol.sgml#L61-L65) (SHA-256 `745339e07ebbc2bb67d98b258e25772ada644ef26011e3cd6b3fcbb435235f89`) · [官方协议文档](/docs/18/protocol.html)\n","description":"PostgreSQL SQLSTATE 25P03：诊断并恢复开放事务中空闲会话被服务器终止的过程。","is_stale":false,"name":"事务中空闲会话超时","sections":[{"anchor":"","heading":"","html":"\u0026lt;h1\u0026gt;25P03 — 事务中空闲会话超时（idle_in_transaction_session_timeout）\u0026lt;/h1\u0026gt;"},{"anchor":"at-a-glance","heading":"速览","html":"\u003cp\u003e\u003ccode\u003e25P03\u003c/code\u003e 是终止会话的 FATAL 条件。当会话在开放事务中等待客户端下一条查询的时间超过有效 \u003ccode\u003eidle_in_transaction_session_timeout\u003c/code\u003e 时触发。选定案例使用 300 ms 作为测试触发值，不是生产建议。\u003c/p\u003e"},{"anchor":"meaning","heading":"含义","html":"\u003cp\u003e该超时防止会话在等待客户端期间长期持有开放事务，从而持有锁并延迟清理。它作用于事务中的空闲等待，包括 \u003ccode\u003eidle in transaction\u003c/code\u003e 和 \u003ccode\u003eidle in transaction (aborted)\u003c/code\u003e 状态，不是正在执行的语句；\u003ccode\u003estatement_timeout\u003c/code\u003e 取消单条语句，而支持该设置的版本中 \u003ccode\u003etransaction_timeout\u003c/code\u003e 限制整个事务生命周期。选定运行只覆盖未中止的 \u003ccode\u003eINTRANS\u003c/code\u003e 路径。\u003c/p\u003e"},{"anchor":"diagnosis","heading":"诊断","html":"\u003cp\u003e会话消失前，先在该目标会话自身检查有效的 \u003ccode\u003eSHOW idle_in_transaction_session_timeout\u003c/code\u003e（或对应的 \u003ccode\u003epg_settings\u003c/code\u003e 行）。控制连接上的 \u003ccode\u003eSHOW\u003c/code\u003e 或 \u003ccode\u003epg_settings\u003c/code\u003e 反映的是观察者后端，不能用来确认另一个会话实际通过 \u003ccode\u003eSET\u003c/code\u003e 得到的值。再从控制连接查看 \u003ccode\u003epg_stat_activity\u003c/code\u003e 中 \u003ccode\u003epid\u003c/code\u003e、\u003ccode\u003eusename\u003c/code\u003e、\u003ccode\u003eapplication_name\u003c/code\u003e、\u003ccode\u003eclient_addr\u003c/code\u003e、\u003ccode\u003estate\u003c/code\u003e、\u003ccode\u003exact_start\u003c/code\u003e、\u003ccode\u003estate_change\u003c/code\u003e、\u003ccode\u003equery_start\u003c/code\u003e、\u003ccode\u003equery\u003c/code\u003e 等字段，并筛选 \u003ccode\u003estate IN ('idle in transaction', 'idle in transaction (aborted)')\u003c/code\u003e。若状态已经中止，应把更早的根错误和 25P02 作为独立诊断保留；选定运行是未中止的 \u003ccode\u003eINTRANS\u003c/code\u003e 路径。这些字段可定位连接池或应用路径以及空闲时长，但观察者权限可能限制可见内容。再按 backend PID、SQLSTATE、\u003ccode\u003eerror_severity = FATAL\u003c/code\u003e 和精确报文关联 FATAL 记录。选定的 psycopg/libpq 栈在驱动诊断和 CSV 日志中都暴露了 25P03；PG18 还提供 JSON 日志。原连接已关闭，不能在其上用 \u003ccode\u003eROLLBACK\u003c/code\u003e 修复事务。\u003c/p\u003e"},{"anchor":"response","heading":"处理","html":"\u003cp\u003e把原会话视为已消失：从连接池移除它，重连后再判断能否重试幂等工作。要避免再次发生，应在连接归还连接池前提交或回滚，并修复留下开放事务的应用路径。不要为了压制错误而降低该超时；更短的值会更容易触发终止。可把有效值设在合法空闲时长之上；只有部署明确接受锁和清理风险时才设为 \u003ccode\u003e0\u003c/code\u003e。服务器关闭该会话时会在退出前回滚开放且尚未完成的事务；死亡连接不能再接收 \u003ccode\u003eROLLBACK\u003c/code\u003e。对已终止会话中已知未提交的事务，不能通过该连接恢复。若是另一种网络故障发生在客户端可能已发送 \u003ccode\u003eCOMMIT\u003c/code\u003e 之后，应从新连接对账业务结果再重试；并非每个 25P03 FATAL 都意味着这种不确定性。\u003c/p\u003e"},{"anchor":"messages","heading":"FATAL 报文","html":"\u003cp\u003e服务器源码固定报出 \u003ccode\u003eterminating connection due to idle-in-transaction timeout\u003c/code\u003e，严重级别为 \u003ccode\u003eFATAL\u003c/code\u003e；原连接会被终止。\u003c/p\u003e"},{"anchor":"observed","heading":"实测诊断","html":"\u003cp\u003e\u003ccode\u003e18.6 (Homebrew) / latest\u003c/code\u003e：FATAL SQLSTATE \u003ccode\u003e25P03\u003c/code\u003e；主报文 \u003ccode\u003eterminating connection due to idle-in-transaction timeout\u003c/code\u003e；backend PID \u003ccode\u003e26447\u003c/code\u003e；原连接已关闭 \u003ccode\u003eTrue\u003c/code\u003e；CSV 日志 \u003ccode\u003e25P03\u003c/code\u003e；JSON 日志 \u003ccode\u003e25P03\u003c/code\u003e；新连接探测 \u003ccode\u003e1\u003c/code\u003e。\n\u003ccode\u003e10.21 (Debian 10.21-1.pgdg90+1) / pg10\u003c/code\u003e：FATAL SQLSTATE \u003ccode\u003e25P03\u003c/code\u003e；主报文 \u003ccode\u003eterminating connection due to idle-in-transaction timeout\u003c/code\u003e；backend PID \u003ccode\u003e81\u003c/code\u003e；原连接已关闭 \u003ccode\u003eTrue\u003c/code\u003e；CSV 日志 \u003ccode\u003e25P03\u003c/code\u003e；JSON 日志 \u003ccode\u003e不适用\u003c/code\u003e；新连接探测 \u003ccode\u003e1\u003c/code\u003e。\u003c/p\u003e"},{"anchor":"case","heading":"代表案例","html":"\u003cp\u003e下列 SQL 片段不是一次性粘贴脚本：在测试连接上执行设置、PID 和 \u003ccode\u003eBEGIN\u003c/code\u003e 后停止发送查询，由独立观察连接或日志收集器等待 FATAL；原连接终止后，另开新连接执行最后的探测。运行器从共享语句清单（registry）读取这些语句，完整断言、日志收集器关联、环境和清理见 \u003ca href=\"#cases\"\u003e案例导出\u003c/a\u003e。\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003e-- set_timeout\nSET idle_in_transaction_session_timeout = '300ms';\n-- backend_pid\nSELECT pg_backend_pid();\n-- begin\nBEGIN;\n-- probe\nSELECT 1;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e上述片段的 SQLSTATE、诊断、状态和修复断言来自共享语句清单（registry）（SHA-256 \u003ccode\u003e95fd079c8bca77c6e3ffc398e404a218e4f810e5fa36e30127cbc6470a6d6eb2\u003c/code\u003e）；\u003ca href=\"#sources\"\u003e结构化证据\u003c/a\u003e。\u003c/p\u003e\n\u003cp\u003e作者证据 ID：\u003ccode\u003eidentity\u003c/code\u003e, \u003ccode\u003etimeout-path\u003c/code\u003e, \u003ccode\u003eruntime\u003c/code\u003e。选定运行记录：\u003ccode\u003eruntime.25P03-batch2c-latest-20260909.latest\u003c/code\u003e, \u003ccode\u003eruntime.25P03-batch2c-pg10-20260909.pg10\u003c/code\u003e。\u003c/p\u003e"},{"anchor":"versions","heading":"版本与边界","html":"\u003cp\u003e选定的 300 ms 终止案例在 PostgreSQL 18.6 与 10.21 通过。PG18 按配置提供 CSV 和 JSON 日志记录；PG10 只有 CSV。两个目标的新连接都成功执行 \u003ccode\u003eSELECT 1\u003c/code\u003e。超时值取决于部署，本案例不规定生产值。\u003c/p\u003e"},{"anchor":"related","heading":"相关","html":"\u003cp\u003e\u003ca href=\"/wiki/sqlstate/25P04/\"\u003e25P04 事务超时\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/25006/\"\u003e25006 只读 SQL 事务\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/57014/\"\u003e57014 查询取消\u003c/a\u003e。\u003c/p\u003e"},{"anchor":"sources","heading":"来源","html":"\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt\"\u003e\u003ccode\u003esrc.errcodes.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003esrc.calls.REL_18_6\u003c/code\u003e — \u003ccode\u003eraw/calls/REL_18_6.jsonl\u003c/code\u003e (SHA-256 \u003ccode\u003e9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L3473-L3501\"\u003e\u003ccode\u003esrc.postgres.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e9fb62275b1badf94d01ab351337b60410cd9b3ab1fe63fa9f23d6d2185a21061\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10252-L10347\"\u003e\u003ccode\u003esrc.config.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003effca322c15315ba670733d6b320f23cbba7374db0d18937298ffc07b58799ef6\u003c/code\u003e) · \u003ca href=\"/docs/18/runtime-config-client.html\"\u003eofficial documentation\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L706-L875\"\u003e\u003ccode\u003edoc.monitoring.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e06b147f8d966fe46821871703ffcee8a3449cc3f7de5b64b9177f48569fe96f6\u003c/code\u003e) · \u003ca href=\"/docs/18/monitoring-stats.html\"\u003e官方监控文档\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L604-L605\"\u003e\u003ccode\u003esrc.system_views.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e418f4ae7472fe0742e6fbdc7a055581602c5131e082aa6f17e2c7269bf711972\u003c/code\u003e) · \u003ca href=\"/docs/18/view-pg-settings.html\"\u003e官方 \u003ccode\u003epg_settings\u003c/code\u003e 文档\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/protocol.sgml#L61-L65\"\u003e\u003ccode\u003edoc.protocol.18.6\u003c/code\u003e\u003c/a\u003e (SHA-256 \u003ccode\u003e745339e07ebbc2bb67d98b258e25772ada644ef26011e3cd6b3fcbb435235f89\u003c/code\u003e) · \u003ca href=\"/docs/18/protocol.html\"\u003e官方协议文档\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e"}],"summary":"会话在开放事务中空闲超时，被服务器终止。","title":"25P03 — 事务中空闲会话超时（idle_in_transaction_session_timeout）","translation_source_rev":"c0e461cdbab5793fcbed82d29ba0e164a35d301742d77f648ea877dc7df3cac6"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":{"aliases":[],"catalogue_notes":{"earliest_observed":"9.6.0","formal_scope":"9.0.0..18.6","latest_observed":"18.6","matrix_scope":["9.0.23","9.1.24","9.2.24","9.3.25","9.4.26","9.5.25","9.6.24","10.23","11.22","12.22","13.23","14.24","15.19","16.15","17.11","18.6"],"pre9_scope":{"formal_tag_count":191,"maximum_release":"8.4.22","minimum_release":"7.0.0","source_definition_count":153,"source_doc_count":153,"source_file_count":306,"source_scope":"7.4..8.4 definition files; 7.0..7.3 candidate-path source gap probes","source_tag_count":153},"pre9_status":"not_observed","preview_scope":["19beta3"]},"class":"25","class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","condition_names":["idle_in_transaction_session_timeout"],"definition_changes":[],"english_manuals":{"10":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"9607b57e9f639b61785677ba4d226f5889fe1d19c8bf55a3337691899a9073cd","slug":"10"},"lang":"en","sqlstate":"25P03"},"11":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"3a024e38263ad77de228eed7930b842b42dc1d5cab9ca3727be8eed872ec9539","slug":"11"},"lang":"en","sqlstate":"25P03"},"12":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"1444bd6a138537cd75be88a220ee9472ac528f0cfc58758e49636d85455efe98","slug":"12"},"lang":"en","sqlstate":"25P03"},"13":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"4a3ef8af218e5736dfde8660ba609e84233b6b3bac7e0210ff8724cf1b27b2db","slug":"13"},"lang":"en","sqlstate":"25P03"},"14":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"1c12e83304e0f4ff64c9d98ca5e3007df6756932ed19867a4fa0e0650f6c5751","slug":"14"},"lang":"en","sqlstate":"25P03"},"15":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"2161f58f6e87f6535b3b1f3d4661427bb6765f4f6b074fcc16fac97594b50599","slug":"15"},"lang":"en","sqlstate":"25P03"},"16":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"928e705933d7c3d018ae3fba9d800b34e6325746d157339dce878473c519d100","slug":"16"},"lang":"en","sqlstate":"25P03"},"17":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"868135520af87351e3ea1ba42656111cbd2d157d98e1fef05ea158ac5729d8b1","slug":"17"},"lang":"en","sqlstate":"25P03"},"18":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"},"lang":"en","sqlstate":"25P03"},"19":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"63fb8d1aa9f494eeab9d0f8542a2b673f7746ee41ae2689d19403cb3cc425a5c","slug":"19"},"lang":"en","sqlstate":"25P03"},"20":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"0d3f602127cd137cf343b32d5fa78f175eeb6cdcb6353b1f6f998ede6cb7b911","slug":"devel"},"lang":"en","sqlstate":"25P03"},"9.6":{"aliases":[],"class_name":"Invalid Transaction State","condition_name":"idle_in_transaction_session_timeout","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"2ab55e487571c8998ec39b3d1bbae29ac6fc5c310875bee422d9a7b8b3fde5b3","slug":"9.6"},"lang":"en","sqlstate":"25P03"}},"history_boundary":{"earliest_observed":"9.6.0","formal_tag_count":351,"gaps":[{"after":"18.6","before":"18.4","reason":"Non-adjacent release tags or a source gap; no removal is inferred."}],"latest_observed":"18.6","pre_range":{"first_observed":null,"known_lower_bound":null,"last_observed":null,"notes":"No occurrence was observed in the locked 7.4..8.4 definition files. Source gaps for 7.0..7.3 prevent a claim that the code was absent before 7.4.","scanned_formal_release_count":153,"scanned_source_scope":"7.4..8.4 definition files; 7.0..7.3 candidate-path source gap probes","source_gap_majors":["7.0","7.1","7.2","7.3"],"status":"partially_scanned"},"preview_snapshots":["19beta3"],"scanned_from":"9.0.0","scanned_to":"18.6"},"introduced":null,"known_present_by":"9.6.0","macros":["ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT"],"manual_presence":["9.6","10","11","12","13","14","15","16","17","18","19","20"],"pre9_first_observed":null,"pre9_introduction_boundary":null,"pre9_last_observed":null,"pre9_presence_intervals":[],"pre9_status":"not_observed","presence_intervals":[{"end":"9.6.24","end_major":"9.6","end_tag":"REL9_6_24","evidence_count":25,"position":0,"start":"9.6.0","start_major":"9.6","start_tag":"REL9_6_0"},{"end":"10.23","end_major":"10","end_tag":"REL_10_23","evidence_count":24,"position":1,"start":"10.0","start_major":"10","start_tag":"REL_10_0"},{"end":"11.22","end_major":"11","end_tag":"REL_11_22","evidence_count":23,"position":2,"start":"11.0","start_major":"11","start_tag":"REL_11_0"},{"end":"12.22","end_major":"12","end_tag":"REL_12_22","evidence_count":23,"position":3,"start":"12.0","start_major":"12","start_tag":"REL_12_0"},{"end":"13.23","end_major":"13","end_tag":"REL_13_23","evidence_count":24,"position":4,"start":"13.0","start_major":"13","start_tag":"REL_13_0"},{"end":"14.24","end_major":"14","end_tag":"REL_14_24","evidence_count":25,"position":5,"start":"14.0","start_major":"14","start_tag":"REL_14_0"},{"end":"15.19","end_major":"15","end_tag":"REL_15_19","evidence_count":20,"position":6,"start":"15.0","start_major":"15","start_tag":"REL_15_0"},{"end":"16.15","end_major":"16","end_tag":"REL_16_15","evidence_count":16,"position":7,"start":"16.0","start_major":"16","start_tag":"REL_16_0"},{"end":"17.11","end_major":"17","end_tag":"REL_17_11","evidence_count":12,"position":8,"start":"17.0","start_major":"17","start_tag":"REL_17_0"},{"end":"18.4","end_major":"18","end_tag":"REL_18_4","evidence_count":5,"position":9,"start":"18.0","start_major":"18","start_tag":"REL_18_0"},{"end":"18.6","end_major":"18","end_tag":"REL_18_6","evidence_count":1,"position":10,"start":"18.6","start_major":"18","start_tag":"REL_18_6"}],"present_in_snapshots":["9.6.24","10.23","11.22","12.22","13.23","14.24","15.19","16.15","17.11","18.6","19beta3"],"preview_in_snapshots":["19beta3"],"primary_macro":"ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT","removed":null,"schema_version":2,"severity_classes":["E"],"sources":[{"blob_id":"sha256:bf4d94d84c7cfe695cb80e8f009872444574719a80a72e347eb66ef3686b86ef","channel":"formal","code_count":238,"commit":"a721a1ba9cf6c86cb52f1bf325d5a27b64e870d6","id":"postgresql:REL9_6_0:src/backend/utils/errcodes.txt","major":"9.6","parsed_path":"raw/definitions/REL9_6_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL9_6_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/a721a1ba9cf6c86cb52f1bf325d5a27b64e870d6/src/backend/utils/errcodes.txt","record_count":244,"release":"9.6.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"bf4d94d84c7cfe695cb80e8f009872444574719a80a72e347eb66ef3686b86ef","size":31135,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL9_6_0","url":"https://github.com/postgres/postgres/blob/a721a1ba9cf6c86cb52f1bf325d5a27b64e870d6/src/backend/utils/errcodes.txt","version":"9.6.0"},{"blob_id":"sha256:e5d829b24fe63aa69429fa1deb9675051fc8ffd4a8a4651861907a8f12ccb144","channel":"formal","code_count":240,"commit":"5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6","id":"postgresql:REL_10_0:src/backend/utils/errcodes.txt","major":"10","parsed_path":"raw/definitions/REL_10_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_10_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/src/backend/utils/errcodes.txt","record_count":246,"release":"10.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"e5d829b24fe63aa69429fa1deb9675051fc8ffd4a8a4651861907a8f12ccb144","size":31340,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_10_0","url":"https://github.com/postgres/postgres/blob/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/src/backend/utils/errcodes.txt","version":"10.0"},{"blob_id":"sha256:8518be6de92ae135765e295c631c5f525120ca2b132453404b620f9aa595cab4","channel":"formal","code_count":241,"commit":"19f20081df059fef87e14c8e953669bd173dd7f1","id":"postgresql:REL_11_0:src/backend/utils/errcodes.txt","major":"11","parsed_path":"raw/definitions/REL_11_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_11_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/19f20081df059fef87e14c8e953669bd173dd7f1/src/backend/utils/errcodes.txt","record_count":247,"release":"11.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"8518be6de92ae135765e295c631c5f525120ca2b132453404b620f9aa595cab4","size":31453,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_11_0","url":"https://github.com/postgres/postgres/blob/19f20081df059fef87e14c8e953669bd173dd7f1/src/backend/utils/errcodes.txt","version":"11.0"},{"blob_id":"sha256:943259f3e36af1343dd0f090f7c7cec0e8c762b038d68c178aaa9b1b11999bfb","channel":"formal","code_count":257,"commit":"ad1f2885b8c82e0c2d56d7974f012cbecce17a17","id":"postgresql:REL_12_0:src/backend/utils/errcodes.txt","major":"12","parsed_path":"raw/definitions/REL_12_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_12_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/ad1f2885b8c82e0c2d56d7974f012cbecce17a17/src/backend/utils/errcodes.txt","record_count":263,"release":"12.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"943259f3e36af1343dd0f090f7c7cec0e8c762b038d68c178aaa9b1b11999bfb","size":33114,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_12_0","url":"https://github.com/postgres/postgres/blob/ad1f2885b8c82e0c2d56d7974f012cbecce17a17/src/backend/utils/errcodes.txt","version":"12.0"},{"blob_id":"sha256:9a464a3c3c99d2488782d4cdd0d46ce261085a944cb0c21e2d884586fbc8204d","channel":"formal","code_count":258,"commit":"29be9983a64c011eac0b9ee29895cce71e15ea77","id":"postgresql:REL_13_0:src/backend/utils/errcodes.txt","major":"13","parsed_path":"raw/definitions/REL_13_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_13_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/29be9983a64c011eac0b9ee29895cce71e15ea77/src/backend/utils/errcodes.txt","record_count":264,"release":"13.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"9a464a3c3c99d2488782d4cdd0d46ce261085a944cb0c21e2d884586fbc8204d","size":33239,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_13_0","url":"https://github.com/postgres/postgres/blob/29be9983a64c011eac0b9ee29895cce71e15ea77/src/backend/utils/errcodes.txt","version":"13.0"},{"blob_id":"sha256:c3c967fa20577f7ded946cb99e1a4706b85bb2476fd32d7e4a133c971a603552","channel":"formal","code_count":259,"commit":"86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c","id":"postgresql:REL_14_0:src/backend/utils/errcodes.txt","major":"14","parsed_path":"raw/definitions/REL_14_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_14_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c/src/backend/utils/errcodes.txt","record_count":265,"release":"14.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"c3c967fa20577f7ded946cb99e1a4706b85bb2476fd32d7e4a133c971a603552","size":33337,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_14_0","url":"https://github.com/postgres/postgres/blob/86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c/src/backend/utils/errcodes.txt","version":"14.0"},{"blob_id":"sha256:a34b5fccd8a27c92817314dd942b79e76896cd1d9a8d4be21c81b02227850b4a","channel":"formal","code_count":260,"commit":"2a7ce2e2ce474504a707ec03e128fde66cfb8b48","id":"postgresql:REL_15_0:src/backend/utils/errcodes.txt","major":"15","parsed_path":"raw/definitions/REL_15_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_15_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/2a7ce2e2ce474504a707ec03e128fde66cfb8b48/src/backend/utils/errcodes.txt","record_count":266,"release":"15.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"a34b5fccd8a27c92817314dd942b79e76896cd1d9a8d4be21c81b02227850b4a","size":33458,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_15_0","url":"https://github.com/postgres/postgres/blob/2a7ce2e2ce474504a707ec03e128fde66cfb8b48/src/backend/utils/errcodes.txt","version":"15.0"},{"blob_id":"sha256:1d1d741b7b7c6dfd8275287e31c79befed75f3b9349e1a42ef0ca147c429ff88","channel":"formal","code_count":260,"commit":"c372fbbd8e911f2412b80a8c39d7079366565d67","id":"postgresql:REL_16_0:src/backend/utils/errcodes.txt","major":"16","parsed_path":"raw/definitions/REL_16_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_16_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/c372fbbd8e911f2412b80a8c39d7079366565d67/src/backend/utils/errcodes.txt","record_count":266,"release":"16.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"1d1d741b7b7c6dfd8275287e31c79befed75f3b9349e1a42ef0ca147c429ff88","size":33458,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_16_0","url":"https://github.com/postgres/postgres/blob/c372fbbd8e911f2412b80a8c39d7079366565d67/src/backend/utils/errcodes.txt","version":"16.0"},{"blob_id":"sha256:bb53279934510355eb4135a807c90d989f07650bd90f87026a4441f11d3296b1","channel":"formal","code_count":260,"commit":"d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e","id":"postgresql:REL_17_0:src/backend/utils/errcodes.txt","major":"17","parsed_path":"raw/definitions/REL_17_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_17_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/backend/utils/errcodes.txt","record_count":266,"release":"17.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"bb53279934510355eb4135a807c90d989f07650bd90f87026a4441f11d3296b1","size":33392,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_17_0","url":"https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/backend/utils/errcodes.txt","version":"17.0"},{"blob_id":"sha256:6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","channel":"formal","code_count":262,"commit":"3d6a828938a5fa0444275d3d2f67b64ec3199eb7","id":"postgresql:REL_18_0:src/backend/utils/errcodes.txt","major":"18","parsed_path":"raw/definitions/REL_18_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_18_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/errcodes.txt","record_count":268,"release":"18.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","size":33739,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_18_0","url":"https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/errcodes.txt","version":"18.0"},{"blob_id":"sha256:cadb9e83cde9a8699a7e74448891ca623af8579ccc8e11c7e533fb47cbc42f89","channel":"preview","code_count":262,"commit":"3638289fb57bdabec00deda98ee9624a35f5d66a","id":"postgresql:REL_19_BETA3:src/backend/utils/errcodes.txt","major":"19","parsed_path":"raw/definitions/REL_19_BETA3.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_19_BETA3.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/3638289fb57bdabec00deda98ee9624a35f5d66a/src/backend/utils/errcodes.txt","record_count":268,"release":"19beta3","release_date":"2026-08-13","repository":"https://github.com/postgres/postgres.git","sha256":"cadb9e83cde9a8699a7e74448891ca623af8579ccc8e11c7e533fb47cbc42f89","size":33739,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_19_BETA3","url":"https://github.com/postgres/postgres/blob/3638289fb57bdabec00deda98ee9624a35f5d66a/src/backend/utils/errcodes.txt","version":"19beta3"}],"sqlstate":"25P03","status":"active","usage_evidence":[{"evidence_ids":["postgresql:REL9_6_0:src/backend/utils/errcodes.txt","postgresql:REL9_6_10:src/backend/utils/errcodes.txt","postgresql:REL9_6_11:src/backend/utils/errcodes.txt","postgresql:REL9_6_12:src/backend/utils/errcodes.txt","postgresql:REL9_6_13:src/backend/utils/errcodes.txt","postgresql:REL9_6_14:src/backend/utils/errcodes.txt","postgresql:REL9_6_15:src/backend/utils/errcodes.txt","postgresql:REL9_6_16:src/backend/utils/errcodes.txt","postgresql:REL9_6_17:src/backend/utils/errcodes.txt","postgresql:REL9_6_18:src/backend/utils/errcodes.txt","postgresql:REL9_6_19:src/backend/utils/errcodes.txt","postgresql:REL9_6_1:src/backend/utils/errcodes.txt","postgresql:REL9_6_20:src/backend/utils/errcodes.txt","postgresql:REL9_6_21:src/backend/utils/errcodes.txt","postgresql:REL9_6_22:src/backend/utils/errcodes.txt","postgresql:REL9_6_23:src/backend/utils/errcodes.txt","postgresql:REL9_6_24:src/backend/utils/errcodes.txt","postgresql:REL9_6_2:src/backend/utils/errcodes.txt","postgresql:REL9_6_3:src/backend/utils/errcodes.txt","postgresql:REL9_6_4:src/backend/utils/errcodes.txt","postgresql:REL9_6_5:src/backend/utils/errcodes.txt","postgresql:REL9_6_6:src/backend/utils/errcodes.txt","postgresql:REL9_6_7:src/backend/utils/errcodes.txt","postgresql:REL9_6_8:src/backend/utils/errcodes.txt","postgresql:REL9_6_9:src/backend/utils/errcodes.txt","postgresql:REL_10_0:src/backend/utils/errcodes.txt","postgresql:REL_10_10:src/backend/utils/errcodes.txt","postgresql:REL_10_11:src/backend/utils/errcodes.txt","postgresql:REL_10_12:src/backend/utils/errcodes.txt","postgresql:REL_10_13:src/backend/utils/errcodes.txt","postgresql:REL_10_14:src/backend/utils/errcodes.txt","postgresql:REL_10_15:src/backend/utils/errcodes.txt","postgresql:REL_10_16:src/backend/utils/errcodes.txt","postgresql:REL_10_17:src/backend/utils/errcodes.txt","postgresql:REL_10_18:src/backend/utils/errcodes.txt","postgresql:REL_10_19:src/backend/utils/errcodes.txt","postgresql:REL_10_1:src/backend/utils/errcodes.txt","postgresql:REL_10_20:src/backend/utils/errcodes.txt","postgresql:REL_10_21:src/backend/utils/errcodes.txt","postgresql:REL_10_22:src/backend/utils/errcodes.txt","postgresql:REL_10_23:src/backend/utils/errcodes.txt","postgresql:REL_10_2:src/backend/utils/errcodes.txt","postgresql:REL_10_3:src/backend/utils/errcodes.txt","postgresql:REL_10_4:src/backend/utils/errcodes.txt","postgresql:REL_10_5:src/backend/utils/errcodes.txt","postgresql:REL_10_6:src/backend/utils/errcodes.txt","postgresql:REL_10_7:src/backend/utils/errcodes.txt","postgresql:REL_10_8:src/backend/utils/errcodes.txt","postgresql:REL_10_9:src/backend/utils/errcodes.txt","postgresql:REL_11_0:src/backend/utils/errcodes.txt","postgresql:REL_11_10:src/backend/utils/errcodes.txt","postgresql:REL_11_11:src/backend/utils/errcodes.txt","postgresql:REL_11_12:src/backend/utils/errcodes.txt","postgresql:REL_11_13:src/backend/utils/errcodes.txt","postgresql:REL_11_14:src/backend/utils/errcodes.txt","postgresql:REL_11_15:src/backend/utils/errcodes.txt","postgresql:REL_11_16:src/backend/utils/errcodes.txt","postgresql:REL_11_17:src/backend/utils/errcodes.txt","postgresql:REL_11_18:src/backend/utils/errcodes.txt","postgresql:REL_11_19:src/backend/utils/errcodes.txt","postgresql:REL_11_1:src/backend/utils/errcodes.txt","postgresql:REL_11_20:src/backend/utils/errcodes.txt","postgresql:REL_11_21:src/backend/utils/errcodes.txt","postgresql:REL_11_22:src/backend/utils/errcodes.txt","postgresql:REL_11_2:src/backend/utils/errcodes.txt","postgresql:REL_11_3:src/backend/utils/errcodes.txt","postgresql:REL_11_4:src/backend/utils/errcodes.txt","postgresql:REL_11_5:src/backend/utils/errcodes.txt","postgresql:REL_11_6:src/backend/utils/errcodes.txt","postgresql:REL_11_7:src/backend/utils/errcodes.txt","postgresql:REL_11_8:src/backend/utils/errcodes.txt","postgresql:REL_11_9:src/backend/utils/errcodes.txt","postgresql:REL_12_0:src/backend/utils/errcodes.txt","postgresql:REL_12_10:src/backend/utils/errcodes.txt","postgresql:REL_12_11:src/backend/utils/errcodes.txt","postgresql:REL_12_12:src/backend/utils/errcodes.txt","postgresql:REL_12_13:src/backend/utils/errcodes.txt","postgresql:REL_12_14:src/backend/utils/errcodes.txt","postgresql:REL_12_15:src/backend/utils/errcodes.txt","postgresql:REL_12_16:src/backend/utils/errcodes.txt","postgresql:REL_12_17:src/backend/utils/errcodes.txt","postgresql:REL_12_18:src/backend/utils/errcodes.txt","postgresql:REL_12_19:src/backend/utils/errcodes.txt","postgresql:REL_12_1:src/backend/utils/errcodes.txt","postgresql:REL_12_20:src/backend/utils/errcodes.txt","postgresql:REL_12_21:src/backend/utils/errcodes.txt","postgresql:REL_12_22:src/backend/utils/errcodes.txt","postgresql:REL_12_2:src/backend/utils/errcodes.txt","postgresql:REL_12_3:src/backend/utils/errcodes.txt","postgresql:REL_12_4:src/backend/utils/errcodes.txt","postgresql:REL_12_5:src/backend/utils/errcodes.txt","postgresql:REL_12_6:src/backend/utils/errcodes.txt","postgresql:REL_12_7:src/backend/utils/errcodes.txt","postgresql:REL_12_8:src/backend/utils/errcodes.txt","postgresql:REL_12_9:src/backend/utils/errcodes.txt","postgresql:REL_13_0:src/backend/utils/errcodes.txt","postgresql:REL_13_10:src/backend/utils/errcodes.txt","postgresql:REL_13_11:src/backend/utils/errcodes.txt","postgresql:REL_13_12:src/backend/utils/errcodes.txt","postgresql:REL_13_13:src/backend/utils/errcodes.txt","postgresql:REL_13_14:src/backend/utils/errcodes.txt","postgresql:REL_13_15:src/backend/utils/errcodes.txt","postgresql:REL_13_16:src/backend/utils/errcodes.txt","postgresql:REL_13_17:src/backend/utils/errcodes.txt","postgresql:REL_13_18:src/backend/utils/errcodes.txt","postgresql:REL_13_19:src/backend/utils/errcodes.txt","postgresql:REL_13_1:src/backend/utils/errcodes.txt","postgresql:REL_13_20:src/backend/utils/errcodes.txt","postgresql:REL_13_21:src/backend/utils/errcodes.txt","postgresql:REL_13_22:src/backend/utils/errcodes.txt","postgresql:REL_13_23:src/backend/utils/errcodes.txt","postgresql:REL_13_2:src/backend/utils/errcodes.txt","postgresql:REL_13_3:src/backend/utils/errcodes.txt","postgresql:REL_13_4:src/backend/utils/errcodes.txt","postgresql:REL_13_5:src/backend/utils/errcodes.txt","postgresql:REL_13_6:src/backend/utils/errcodes.txt","postgresql:REL_13_7:src/backend/utils/errcodes.txt","postgresql:REL_13_8:src/backend/utils/errcodes.txt","postgresql:REL_13_9:src/backend/utils/errcodes.txt","postgresql:REL_14_0:src/backend/utils/errcodes.txt","postgresql:REL_14_10:src/backend/utils/errcodes.txt","postgresql:REL_14_11:src/backend/utils/errcodes.txt","postgresql:REL_14_12:src/backend/utils/errcodes.txt","postgresql:REL_14_13:src/backend/utils/errcodes.txt","postgresql:REL_14_14:src/backend/utils/errcodes.txt","postgresql:REL_14_15:src/backend/utils/errcodes.txt","postgresql:REL_14_16:src/backend/utils/errcodes.txt","postgresql:REL_14_17:src/backend/utils/errcodes.txt","postgresql:REL_14_18:src/backend/utils/errcodes.txt","postgresql:REL_14_19:src/backend/utils/errcodes.txt","postgresql:REL_14_1:src/backend/utils/errcodes.txt","postgresql:REL_14_20:src/backend/utils/errcodes.txt","postgresql:REL_14_21:src/backend/utils/errcodes.txt","postgresql:REL_14_22:src/backend/utils/errcodes.txt","postgresql:REL_14_23:src/backend/utils/errcodes.txt","postgresql:REL_14_24:src/backend/utils/errcodes.txt","postgresql:REL_14_2:src/backend/utils/errcodes.txt","postgresql:REL_14_3:src/backend/utils/errcodes.txt","postgresql:REL_14_4:src/backend/utils/errcodes.txt","postgresql:REL_14_5:src/backend/utils/errcodes.txt","postgresql:REL_14_6:src/backend/utils/errcodes.txt","postgresql:REL_14_7:src/backend/utils/errcodes.txt","postgresql:REL_14_8:src/backend/utils/errcodes.txt","postgresql:REL_14_9:src/backend/utils/errcodes.txt","postgresql:REL_15_0:src/backend/utils/errcodes.txt","postgresql:REL_15_10:src/backend/utils/errcodes.txt","postgresql:REL_15_11:src/backend/utils/errcodes.txt","postgresql:REL_15_12:src/backend/utils/errcodes.txt","postgresql:REL_15_13:src/backend/utils/errcodes.txt","postgresql:REL_15_14:src/backend/utils/errcodes.txt","postgresql:REL_15_15:src/backend/utils/errcodes.txt","postgresql:REL_15_16:src/backend/utils/errcodes.txt","postgresql:REL_15_17:src/backend/utils/errcodes.txt","postgresql:REL_15_18:src/backend/utils/errcodes.txt","postgresql:REL_15_19:src/backend/utils/errcodes.txt","postgresql:REL_15_1:src/backend/utils/errcodes.txt","postgresql:REL_15_2:src/backend/utils/errcodes.txt","postgresql:REL_15_3:src/backend/utils/errcodes.txt","postgresql:REL_15_4:src/backend/utils/errcodes.txt","postgresql:REL_15_5:src/backend/utils/errcodes.txt","postgresql:REL_15_6:src/backend/utils/errcodes.txt","postgresql:REL_15_7:src/backend/utils/errcodes.txt","postgresql:REL_15_8:src/backend/utils/errcodes.txt","postgresql:REL_15_9:src/backend/utils/errcodes.txt","postgresql:REL_16_0:src/backend/utils/errcodes.txt","postgresql:REL_16_10:src/backend/utils/errcodes.txt","postgresql:REL_16_11:src/backend/utils/errcodes.txt","postgresql:REL_16_12:src/backend/utils/errcodes.txt","postgresql:REL_16_13:src/backend/utils/errcodes.txt","postgresql:REL_16_14:src/backend/utils/errcodes.txt","postgresql:REL_16_15:src/backend/utils/errcodes.txt","postgresql:REL_16_1:src/backend/utils/errcodes.txt","postgresql:REL_16_2:src/backend/utils/errcodes.txt","postgresql:REL_16_3:src/backend/utils/errcodes.txt","postgresql:REL_16_4:src/backend/utils/errcodes.txt","postgresql:REL_16_5:src/backend/utils/errcodes.txt","postgresql:REL_16_6:src/backend/utils/errcodes.txt","postgresql:REL_16_7:src/backend/utils/errcodes.txt","postgresql:REL_16_8:src/backend/utils/errcodes.txt","postgresql:REL_16_9:src/backend/utils/errcodes.txt","postgresql:REL_17_0:src/backend/utils/errcodes.txt","postgresql:REL_17_10:src/backend/utils/errcodes.txt","postgresql:REL_17_11:src/backend/utils/errcodes.txt","postgresql:REL_17_1:src/backend/utils/errcodes.txt","postgresql:REL_17_2:src/backend/utils/errcodes.txt","postgresql:REL_17_3:src/backend/utils/errcodes.txt","postgresql:REL_17_4:src/backend/utils/errcodes.txt","postgresql:REL_17_5:src/backend/utils/errcodes.txt","postgresql:REL_17_6:src/backend/utils/errcodes.txt","postgresql:REL_17_7:src/backend/utils/errcodes.txt","postgresql:REL_17_8:src/backend/utils/errcodes.txt","postgresql:REL_17_9:src/backend/utils/errcodes.txt","postgresql:REL_18_0:src/backend/utils/errcodes.txt","postgresql:REL_18_1:src/backend/utils/errcodes.txt","postgresql:REL_18_2:src/backend/utils/errcodes.txt","postgresql:REL_18_3:src/backend/utils/errcodes.txt","postgresql:REL_18_4:src/backend/utils/errcodes.txt","postgresql:REL_18_6:src/backend/utils/errcodes.txt","postgresql:REL_19_BETA3:src/backend/utils/errcodes.txt"],"notes":"Presence in a PostgreSQL release definition file is established; runtime throw/use scanning is maintained separately.","scope":"release-definition-catalogue","status":"definition_only"},{"evidence_ids":[],"notes":"No occurrence was found in the locked 7.4..8.4 definition files; 7.0..7.3 source gaps remain explicit.","scope":"pre9-definition-history","status":"unknown"}]},"Evidence":[{"Kind":"cases","Ordinal":0,"ID":"idle_in_transaction_timeout","ServerVersion":null,"Status":null,"Payload":{"assertions":["The original session is terminated by the timeout","The collector records FATAL 25P03 for the matching backend PID","A fresh connection can execute SELECT 1"],"case_id":"idle_in_transaction_timeout","cleanup":"Drop the case schema with an owner connection.","has_snippet":true,"position":0,"preconditions":["A runner-owned disposable target is provisioned."],"repair":"Use the state-specific recovery documented on the page; do not reuse a terminated connection.","trigger":"Set idle_in_transaction_session_timeout, BEGIN, wait idle, and probe the terminated session.","versions":["10","18"]}},{"Kind":"claims","Ordinal":0,"ID":"identity","ServerVersion":null,"Status":null,"Payload":{"claim_id":"identity","limits":"The code is emitted at session termination severity FATAL in the selected path.","method":"Read the fixed condition row and macro.","position":0,"runtime":[],"sources":["src.errcodes.18.6"],"statement":"25P03 is idle_in_transaction_session_timeout in Class 25."}},{"Kind":"claims","Ordinal":1,"ID":"timeout-path","ServerVersion":null,"Status":null,"Payload":{"claim_id":"timeout-path","limits":"The server terminates the connection; ROLLBACK cannot be sent through that dead session.","method":"Trace the timeout interrupt and the fixed configuration documentation.","position":1,"runtime":[],"sources":["src.postgres.18.6","src.config.18.6","src.calls.REL_18_6"],"statement":"ProcessInterrupts emits FATAL 25P03 after the session has remained idle inside an open transaction longer than idle_in_transaction_session_timeout."}},{"Kind":"claims","Ordinal":2,"ID":"runtime","ServerVersion":null,"Status":null,"Payload":{"claim_id":"runtime","limits":"The selected timeout is 300 ms in a runner-owned disposable target; production timeout policy is deployment-specific.","method":"Match collector records by PID, SQLSTATE, and message, then probe a fresh connection.","position":2,"runtime":[],"sources":["runtime","runtime.25P03-batch2c-latest-20260909.latest","runtime.25P03-batch2c-pg10-20260909.pg10"],"statement":"Both selected targets received FATAL 25P03 for the exact backend PID, and a fresh owner connection successfully ran SELECT 1 after termination."}},{"Kind":"claims","Ordinal":3,"ID":"diagnosis-observer-boundary","ServerVersion":null,"Status":null,"Payload":{"claim_id":"diagnosis-observer-boundary","limits":"Visibility of pg_stat_activity fields depends on observer privileges; the selected runtime records establish PID/log correlation, not universal monitoring permissions.","method":"Read the fixed monitoring view documentation and system-view definition before writing the observer/session diagnostic split.","position":3,"runtime":[],"sources":["doc.monitoring.18.6","src.system_views.18.6"],"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."}},{"Kind":"claims","Ordinal":4,"ID":"state-scope","ServerVersion":null,"Status":null,"Payload":{"claim_id":"state-scope","limits":"No aborted-transaction timeout was run in this batch; preserve any earlier root error and 25P02 separately when diagnosing that state.","method":"Read the fixed pg_stat_activity state definitions alongside the timeout GUC description and compare them with the selected runtime status.","position":4,"runtime":[],"sources":["doc.monitoring.18.6","src.config.18.6"],"statement":"The fixed monitoring view distinguishes idle in transaction from idle in transaction (aborted); the timeout documentation's open-transaction scope covers idle waiting, while the selected runtime demonstrates only the non-aborted INTRANS path."}},{"Kind":"claims","Ordinal":5,"ID":"termination-rollback","ServerVersion":null,"Status":null,"Payload":{"claim_id":"termination-rollback","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.","method":"Read the fixed protocol session-termination rule and align the recovery prose with the FATAL path.","position":5,"runtime":[],"sources":["doc.protocol.18.6"],"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."}},{"Kind":"messages","Ordinal":0,"ID":"fatal","ServerVersion":null,"Status":null,"Payload":{"limits":"This is a static FATAL message; the driver may expose or omit SQLSTATE depending on client stack.","message_id":"fatal","path":"","position":0,"raw":{"id":"fatal","limits":"This is a static FATAL message; the driver may expose or omit SQLSTATE depending on client stack.","primary_template":"terminating connection due to idle-in-transaction timeout","severity_source":"FATAL","sources":["src.postgres.18.6"],"sqlstate":"25P03"},"severity":"FATAL","sources":["src.postgres.18.6"],"templates":[{"kind":"primary","literal":"terminating connection due to idle-in-transaction timeout","position":0,"role":"","template":"terminating connection due to idle-in-transaction timeout"}]}},{"Kind":"runtimes","Ordinal":0,"ID":"runtime.25P03-batch2c-latest-20260909.latest","ServerVersion":"18.6 (Homebrew)","Status":"passed","Payload":{"cases":["idle_in_transaction_timeout"],"limits":"","position":0,"raw":{"case_manifest":{"path":"verify/cases/25P03/cases.json","sha256":"e6c8d08f3b964c308d1a2c87f64919aa7d914db438456658afa230383c7f27eb"},"case_status":"passed","cases":["idle_in_transaction_timeout"],"id":"runtime.25P03-batch2c-latest-20260909.latest","observed":{"backend_pid":26447,"collector_csv_error_severity":"FATAL","collector_csv_sqlstate":"25P03","collector_json_error_severity":"FATAL","collector_json_sqlstate":"25P03","fresh_connection_probe":1,"fresh_connection_status":"IDLE","original_connection_closed":true,"primary":"terminating connection due to idle-in-transaction timeout","recovery_requires_new_connection":true,"severity":"FATAL","sqlstate":"25P03","status_before_timeout":"INTRANS"},"raw":"verify/results/25P03-batch2c-latest-20260909/latest/raw.jsonl","raw_sha256":"eeb467a1908730a03d6eb9cf1e1319a5d658dcb4a0bb42d0907f8045682778bf","run_id":"25P03-batch2c-latest-20260909","server_version":"18.6 (Homebrew)","server_version_num":180006,"snippet_registry":{"path":"verify/cases/25P03/snippets.json","sha256":"95fd079c8bca77c6e3ffc398e404a218e4f810e5fa36e30127cbc6470a6d6eb2"},"status":"passed","summary":"verify/results/25P03-batch2c-latest-20260909/latest/summary.json","summary_sha256":"ec210989486eb92bda87e874942b5987d23f121f914c780e30851f3fe04e9379","target":"latest","target_status":"passed"},"run_id":"25P03-batch2c-latest-20260909","runtime_id":"runtime.25P03-batch2c-latest-20260909.latest","server_version":"18.6 (Homebrew)","status":"passed","target":"latest"}},{"Kind":"runtimes","Ordinal":1,"ID":"runtime.25P03-batch2c-pg10-20260909.pg10","ServerVersion":"10.21 (Debian 10.21-1.pgdg90+1)","Status":"passed","Payload":{"cases":["idle_in_transaction_timeout"],"limits":"","position":1,"raw":{"case_manifest":{"path":"verify/cases/25P03/cases.json","sha256":"e6c8d08f3b964c308d1a2c87f64919aa7d914db438456658afa230383c7f27eb"},"case_status":"passed","cases":["idle_in_transaction_timeout"],"id":"runtime.25P03-batch2c-pg10-20260909.pg10","observed":{"backend_pid":81,"collector_csv_error_severity":"FATAL","collector_csv_sqlstate":"25P03","collector_json_error_severity":null,"collector_json_sqlstate":null,"fresh_connection_probe":1,"fresh_connection_status":"IDLE","original_connection_closed":true,"primary":"terminating connection due to idle-in-transaction timeout","recovery_requires_new_connection":true,"severity":"FATAL","sqlstate":"25P03","status_before_timeout":"INTRANS"},"raw":"verify/results/25P03-batch2c-pg10-20260909/pg10/raw.jsonl","raw_sha256":"cc716ef184879dac6e0e6885922e940faa0bfed5ef22ef64e479403db499c7e8","run_id":"25P03-batch2c-pg10-20260909","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","server_version_num":100021,"snippet_registry":{"path":"verify/cases/25P03/snippets.json","sha256":"95fd079c8bca77c6e3ffc398e404a218e4f810e5fa36e30127cbc6470a6d6eb2"},"status":"passed","summary":"verify/results/25P03-batch2c-pg10-20260909/pg10/summary.json","summary_sha256":"a76cbc2408369f7baca614ed533cba18d8b7f105d7fd3319107be5c01143917d","target":"pg10","target_status":"passed"},"run_id":"25P03-batch2c-pg10-20260909","runtime_id":"runtime.25P03-batch2c-pg10-20260909.pg10","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","status":"passed","target":"pg10"}},{"Kind":"sources","Ordinal":0,"ID":"src.errcodes.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"upstream_source","location":"","path":"src/backend/utils/errcodes.txt","position":0,"sha256":"6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","source_id":"src.errcodes.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"}},{"Kind":"sources","Ordinal":1,"ID":"src.calls.REL_18_6","ServerVersion":null,"Status":null,"Payload":{"commit":"","docs_url":"","kind":"local_artifact","location":"","path":"raw/calls/REL_18_6.jsonl","position":1,"sha256":"9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf","source_id":"src.calls.REL_18_6","tag":"","url":""}},{"Kind":"sources","Ordinal":2,"ID":"src.postgres.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"upstream_source","location":"","path":"src/backend/tcop/postgres.c","position":2,"sha256":"9fb62275b1badf94d01ab351337b60410cd9b3ab1fe63fa9f23d6d2185a21061","source_id":"src.postgres.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L3473-L3501"}},{"Kind":"sources","Ordinal":3,"ID":"src.config.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"https://www.postgresql.org/docs/18/runtime-config-client.html","kind":"upstream_source","location":"","path":"doc/src/sgml/config.sgml","position":3,"sha256":"ffca322c15315ba670733d6b320f23cbba7374db0d18937298ffc07b58799ef6","source_id":"src.config.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10252-L10347"}},{"Kind":"sources","Ordinal":4,"ID":"doc.monitoring.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"https://www.postgresql.org/docs/18/monitoring-stats.html","kind":"upstream_source","location":"","path":"doc/src/sgml/monitoring.sgml","position":4,"sha256":"06b147f8d966fe46821871703ffcee8a3449cc3f7de5b64b9177f48569fe96f6","source_id":"doc.monitoring.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L706-L875"}},{"Kind":"sources","Ordinal":5,"ID":"src.system_views.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"https://www.postgresql.org/docs/18/view-pg-settings.html","kind":"upstream_source","location":"","path":"src/backend/catalog/system_views.sql","position":5,"sha256":"418f4ae7472fe0742e6fbdc7a055581602c5131e082aa6f17e2c7269bf711972","source_id":"src.system_views.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L604-L605"}},{"Kind":"sources","Ordinal":6,"ID":"doc.protocol.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"https://www.postgresql.org/docs/18/protocol.html","kind":"upstream_source","location":"","path":"doc/src/sgml/protocol.sgml","position":6,"sha256":"745339e07ebbc2bb67d98b258e25772ada644ef26011e3cd6b3fcbb435235f89","source_id":"doc.protocol.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/protocol.sgml#L61-L65"}}]}
