Thanks all. I should add a few things to this question:
The queries would always be SELECT queries. Users would be doing the query
from apps like NCR QueryMan or Crystal Reports. While I could connect to
my box via the command line and kill the PID, I hoped there was a way to
utilize the quit query capabilities both of these apps provide.
Patrick Hatcher
Macys.Com
Legacy Integration Developer
|--------+--------------------------------->
| | Tom Lane |
| | <tgl@sss.pgh.pa.us> |
| | Sent by: |
| | pgsql-novice-owner@post|
| | gresql.org |
| | |
| | |
| | 11/11/2002 04:58 PM |
|--------+--------------------------------->
>------------------------------------------------------------------------------------------------------------|
| |
| To: josh@agliodbs.com |
| cc: "Patrick Hatcher" <PHatcher@macys.com>, pgsql-novice@postgresql.org |
| Subject: Re: [NOVICE] Cancelling long running query? |
>------------------------------------------------------------------------------------------------------------|
Josh Berkus <josh@agliodbs.com> writes:
>> How can I cancel a long running query besides quitting the app?
> Methods:
> 1) Shutdown and restart the database server with pg_ctl -m fast restart.
Better is just to send SIGINT to the individual backend running the
query. This is equivalent to the client having made a QueryCancel
request.
> 2) Kill the client connection proccess on the server side. This is
dangerous
> if the long-running query is a data-modification query.
No more dangerous than any other forced database crash ... which is what
you will get if you kill a backend process ...
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org