Type: integer
Default: 0 (0ms)
Min: 0 (0ms)
Max: 2147483647 (2147483647ms)
Unit: milliseconds (ms)
Context: user
Restart: false
Since: 17

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.

Prepared transactions are not subject to this timeout.

Comments