statement_timeout
A configuration parameter determining the length of time before a statement times out
statement_timeout
is a configuration parameter determining the length of time before a statement automatically times out.
statement_timeout
was added in PostgreSQL 7.3.
Default value
The default value for statement_timeout
is: 0
(disabled).
Usage
It is recommended to set statement_timeout
at session level, rather than globally via postgresql.conf
.
Change history
- PostgreSQL 7.3
- added (commit 4db8718e)
Examples
Usage example:
postgres=# SET statement_timeout = '5s'; SET Time: 0.793 ms postgres=# SELECT pg_sleep(10); ERROR: canceling statement due to statement timeout Time: 5001.041 ms (00:05.001)
References
- PostgreSQL documentation: statement_timeout