Search Postgresql Archives

Re: setting connection/ query timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 19, 2011 at 8:09 PM, tamanna madaan
<tamanna.madan@xxxxxxxxxxxxxxx> wrote:

> Sometimes this query gets stuck for unknown reason . So, for this particular
> query I want to set a timeout
> . I dont want to change "statement_timeout" in postgresql.conf as this would
> affect all the connections/queries.
> I just want to set timeout for above mentioned query . How can I do that ??

You can set a timeout only valid for the session using SET:

=> set statement_timeout to 1000;
SET
=> select pg_sleep(2);
ERROR:  canceling statement due to statement timeout

-- Daniele

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux