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).

Change history

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)

Categories

GUC configuration item, Statements

See also

deadlock_timeout, lock_timeout