Re: Cancel query based on a timeout

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: Stijn Vanroye <s(dot)vanroye(at)farcourier(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cancel query based on a timeout
Date: 2004-05-10 11:50:22
Message-ID: 409F6C7E.8040300@frodo.hserus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stijn Vanroye wrote:
> Hi List,
>
> I'm running a query on a not-so-small db. Mostly this query runs fast enough, but every once in a while the query takes a long time to complete in wich case the users start banging away on the keyboard :-).
>
> What we would like to do is cancel the query after a certain time-out (e.g. 30 sec.)
> Is there some way to send a command to the postgres sever to stop running the query?
>
> We're using Postgres 7.3.4 and the latest ODBC driver. Programming is done with Borland Delphi 7

AFAIK, there is a statement timeout option but exactly which version brought it
in escapes me ATM...Most probably 7.4.x but don't take my word for it. Check you
r postgrersql.conf for details.

HTH

Shridhar

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-05-10 11:56:20 Re: passing strings to functions
Previous Message Tom Lane 2004-05-10 11:44:10 Re: full tuple count in cursor.