Re: best way to kill long running query? - Mailing list pgsql-general

From Bill Eaton
Subject Re: best way to kill long running query?
Date
Msg-id BHEMIOKCPPFPFJCHEKDCKEIICFAA.EE2@aeroantenna.com
Whole thread Raw
In response to Re: best way to kill long running query?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: best way to kill long running query?  (Magnus Hagander <magnus@hagander.net>)
Re: best way to kill long running query?  (Vivek Khera <vivek@khera.org>)
List pgsql-general
>> I want to allow some queries for my users to run for a prescribed period
of
>> time and kill them if they go over time. Is there a good way to do this?

> set statement_timeout perhaps?

Ooh. I like that. It would be absolutely brilliant if I could figure out how
to get it to work with ADO and the Windoze ODBC driver. I've tried appending
statement_timeout to my connection string i.e.
  ConnString = "DRIVER={PostgreSQL
Unicode};SERVER=MYSERVER;DATABASE=MYDB;UID=client;set_timeout=1"
but it has no effect on a SELECT statement that takes at least 3 or 4
seconds to execute and only returns 184 (out of 600,000) records.

I've also tried different syntaxes to pass the parameter
  set_timeout=1
  set_timeout='1'
  set_timeout=(1)
  set_timeout=('1')



pgsql-general by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: to_tsvector in 8.2.3
Next
From: Magnus Hagander
Date:
Subject: Re: best way to kill long running query?