From: | "tamanna madaan" <tamanna(dot)madan(at)globallogic(dot)com> |
---|---|
To: | "Daniele Varrazzo" <daniele(dot)varrazzo(at)gmail(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: setting connection/ query timeout |
Date: | 2011-04-28 09:41:28 |
Message-ID: | 68666423656E1444A011106C4E085F4D96F313@ex3-del1.synapse.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks Daniele
-----Original Message-----
From: Daniele Varrazzo [mailto:daniele(dot)varrazzo(at)gmail(dot)com]
Sent: Wed 4/20/2011 1:15 AM
To: tamanna madaan
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] setting connection/ query timeout
On Tue, Apr 19, 2011 at 8:09 PM, tamanna madaan
<tamanna(dot)madan(at)globallogic(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Szymon Guz | 2011-04-28 09:41:56 | Re: Converting between varchar and float when updating |
Previous Message | Dmitriy Igrishin | 2011-04-28 09:40:40 | Re: Converting between varchar and float when updating |