{"Entry":{"collection":"guc","key":"transaction_deferrable","name":"transaction_deferrable","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Client Connection Defaults / Statement Behavior","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.0","status":"added","to":"9.1"},{"documentation_changed":true,"fields":{},"from":"9.5","status":"changed","to":"9.6"}],"content_hash":"fe757c94dea902c83be8893546fe16e59af73a46d1c66e498a553cf4f4f87559","context":"","default_changed_in":[],"default_history":[{"from":"9.1","to":"19","value":"off"}],"derived_content_hash":"8953db5b719ddaa0bb17680dd5c22eac4608a5483f308b4b554e9940c90bb9d4","editorial":{"advice":{"olap":"For reporting, consider a read-only transaction and an isolation choice that matches snapshot requirements; use deferrability only with read-only serializable work.","oltp":"Choose transaction_deferrable for correctness semantics first. Keep the common OLTP path explicit, then override only transactions whose consistency contract justifies different blocking or retry behavior.","small":"Do not change transaction_deferrable as a generic speed tweak. Higher isolation or long snapshots can amplify contention and vacuum pressure on a small node."},"mechanism":["transaction_deferrable controls whether PostgreSQL should defer a read-only serializable transaction until it can be executed with no possible serialization failures. It reflects the current transaction and is meaningful only for a read-only serializable transaction before the snapshot is acquired.","transaction_deferrable is session-settable but represents the current transaction; PostgreSQL restricts changes after the transaction has acquired a snapshot or performed conflicting work.","The default_* variables seed the corresponding transaction_* state. Isolation, read-only status, deferrability, retries, and snapshot lifetime must be designed together."],"pitfalls":["Changing transaction_deferrable in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.","Changing transaction semantics as a performance experiment and silently weakening an application's consistency contract.","Letting a pooled session retain transaction-related state because checkout or rollback/reset handling is incomplete.","Changing transaction_deferrable globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: transaction_deferrable","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-TRANSACTION-DEFERRABLE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["default_transaction_isolation","transaction_isolation","default_transaction_read_only","transaction_read_only","default_transaction_deferrable"],"summary":"transaction_deferrable is the PostgreSQL setting that controls whether PostgreSQL should defer a read-only serializable transaction until it can be executed with no possible serialization failures."},"enumvals":[],"first_version":"9.1","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:32.228188+08:00","intro_commit":{"authored_at":"2011-02-07T23:46:51+02:00","discussion":[],"hash":"dafaa3efb75ce1aae2e6dbefaf6f3a889dea0d21","subject":"Implement genuine serializable isolation level.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=dafaa3efb75ce1aae2e6dbefaf6f3a889dea0d21"},"key":"transaction_deferrable","last_version":"20","max_val":"","min_val":"","name":"transaction_deferrable","position":434,"present_in":["9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:d62605dc3462f16698c60b397493c235c93e39018437636be5cba6fe509e87ed","receipt_sha256":"2f8496c642f7f2b9cbfb8d26b42db4b66284bd04de568a774c44c7ca5b5fb811","repair":"wiki-repair-20261023"},"short_desc":"This parameter reflects the current transaction's deferrability status.","short_desc_zh":"","source_rev":"wiki-repair-20261023:8501c68db5ce755a81aa16afc69ed43edc46958e7d44b6fee48a0bf2f6485482","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"transaction_deferrable","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"transaction_deferrable","SourceRevision":"wiki-repair-20261023:8501c68db5ce755a81aa16afc69ed43edc46958e7d44b6fee48a0bf2f6485482","Facts":{"boot_val":"off","category":"Client Connection Defaults / Statement Behavior","context":"user","description":"This parameter reflects the current transaction's deferrability status. At the beginning of each transaction, it is set to the current value of default_transaction_deferrable. Any subsequent attempt to change it is equivalent to a SET TRANSACTION command.","description_zh":"此参数反映当前事务的可延迟性状态。在每个事务的开始，它被设置为 default_transaction_deferrable 的当前值。任何后续更改它的尝试都等同于 SET TRANSACTION 命令。","description_zh_html":"\u003cp\u003e\n        此参数反映当前事务的可延迟性状态。在每个事务的开始，它被设置为 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-DEFERRABLE\"\u003edefault_transaction_deferrable\u003c/a\u003e 的当前值。任何后续更改它的尝试都等同于 \u003ca class=\"xref\" href=\"/zh/docs/18/sql-set-transaction.html\" title=\"SET TRANSACTION\"\u003e\u003cspan class=\"refentrytitle\"\u003eSET TRANSACTION\u003c/span\u003e\u003c/a\u003e 命令。\n       \u003c/p\u003e","doc":{"anchor":"GUC-TRANSACTION-DEFERRABLE","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"transaction_deferrable","short_desc":"Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-client.html","sha256":"1882f8fd5576909c4fcc44af53077378871e05f5be67723f20fe300273024767"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"bool","zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"GUC-TRANSACTION-DEFERRABLE","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"transaction_deferrable","SourceDatabase":"center","Version":"18","Locale":"en","Title":"transaction_deferrable","Summary":"This parameter reflects the current transaction's deferrability status. At the beginning of each transaction, it is set to the current value of default_transaction_deferrable. Any subsequent attempt to change it is equivalent to a SET TRANSACTION command.","BodyHTML":"\u003cp\u003eThis parameter reflects the current transaction\u0026#39;s deferrability status. At the beginning of each transaction, it is set to the current value of default_transaction_deferrable. Any subsequent attempt to change it is equivalent to a SET TRANSACTION command.\u003c/p\u003e","SourceRevision":"wiki-repair-20261023:8501c68db5ce755a81aa16afc69ed43edc46958e7d44b6fee48a0bf2f6485482","ContentHash":"9b7b0dd5067573e7a6d5f1fc9c8504626e8b334c565aa937efd8ff691886a54b","Payload":{"description":"This parameter reflects the current transaction's deferrability status. At the beginning of each transaction, it is set to the current value of default_transaction_deferrable. Any subsequent attempt to change it is equivalent to a SET TRANSACTION command."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
