SQLzoo.net

Set a timeout.

Postgres
Users may accidentally (or deliberately) start queries which would take a very long time to complete. We can set a 'timeout'; this means that the system gives up after a certain amount of time.


Specific to Postgres
In SQL you can set the session-wide timeout
SET STATEMENT_TIMEOUT TO 60000
You can specify a limit from the system in postgresql.conf

Related links:

  • USERS