Re: Killing "stuck" queries and preventing queries from getting "stuck"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Uckun <timuckun(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Killing "stuck" queries and preventing queries from getting "stuck"
Date: 2010-09-28 02:39:33
Message-ID: 13583.1285641573@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tim Uckun <timuckun(at)gmail(dot)com> writes:
> Is there a way to tell postgres to stop any query that runs longer
> than a specified amount of time? Say an hour?

Setting statement_timeout would do that. You ought to figure out
what's causing the performance problem, though, instead of just
zapping things ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2010-09-28 02:48:56 Re: Deleting orphaned records (not exists is very slow)
Previous Message Satoshi Nagayasu 2010-09-28 02:38:44 Re: ECPG - Some errno definitions don't match to the manual