Wiki / Configuration Parameters
transaction_timeout
Terminate any session that spans longer than the specified amount of time in a transaction. The limit applies both to explicit transactions (started with BEGIN) and to an implicitly started transaction corresponding to a single statement. If this value is specified without units, it is taken as milliseconds. A value of zero (the default) disables the timeout. If transaction_timeout is shorter or equal to idle_in_transaction_session_timeout or statement_timeout then the longer timeout is ignored. Setting transaction_timeout in postgresql.conf is not recommended because it would affect all sessions. Note Prepared transactions are not subject to this timeout.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- boot val
- 0
- category
- Client Connection Defaults / Statement Behavior
- context
- user
- documented
- true
- enumvals
- Unknown
- extra desc
- 0 disables the timeout.
- lang
- en
- max val
- 2147483647
- metadata version
- 18
- min val
- 0
- name
- transaction_timeout
- short desc
- Sets the maximum allowed duration of any transaction within a session (not a prepared transaction).
- source
- pg-settings-source-snapshot
- unit
- ms
- vartype
- integer
Definition PG 18
Terminate any session that spans longer than the specified amount of time in a transaction. The limit applies both to explicit transactions (started with BEGIN) and to an implicitly started transaction corresponding to a single statement. If this value is specified without units, it is taken as milliseconds. A value of zero (the default) disables the timeout. If transaction_timeout is shorter or equal to idle_in_transaction_session_timeout or statement_timeout then the longer timeout is ignored. Setting transaction_timeout in postgresql.conf is not recommended because it would affect all sessions. Note Prepared transactions are not subject to this timeout.
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:f18533ee9f443b35950ff00c6d2138b900d5a8c3783b487ba09c80da33958b25
Text language: en · wiki-repair-20261023:f18533ee9f443b35950ff00c6d2138b900d5a8c3783b487ba09c80da33958b25