Christopher Tyler

Set Statement Timeout

I don’t recall where I saw this, but in PostgreSQL, you can set a statement timeout to potentially prevent problems with a long running query running.

1
$ alter database mydatabase set statement_timeout = '60s';

Another thing you may want to set is idle_in_transaction timeout as well which will cancel long running transaction that are no longer performing work.

There is more information in PostgreSQL documentation.

<< Previous Post

|

Next Post >>

#Til #Timeout #Statement_timeout #Postgresql #Idle_in_transaction