Set A Statement Timeout Threshold For A Session
> set statement_timeout = 60000;
SET
> show statement_timeout;
statement_timeout
-------------------
1min
(1 row)> set statement_timeout = '30s';
SET
> show statement_timeout;
statement_timeout
-------------------
30s
(1 row)> select pg_sleep(31);
ERROR: canceling statement due to statement timeout
Time: 30001.997 ms (00:30.002)Last updated