Re: Terminate query on page exit - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Terminate query on page exit
Date
Msg-id A737B7A37273E048B164557ADEF4A58B057B522A@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to Re: Terminate query on page exit  (patrick keshishian <pkeshish@gmail.com>)
List pgsql-general
patrick keshishian wrote:
>>> Any method to kill such query would it still hang out there?
>>
>> One crude method would be to set statement_timeout to a nonzero
>> value - then queries that take longer than that many seconds
>> will be canceled.
>=20
> you don't truly mean to advise that, do you? :)

Well, it might be useful as a kind of safeguard against
runaway queries that hog the server for hours.

If you expect that no reasonable query will take
more than a couple of minutes, you could set
statement_timeout=3D600 to kill anything that's still alive
after 10 minutes.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Terminate query on page exit
Next
From: Adrian Klaver
Date:
Subject: Re: Connection with server dropping out