Re: Killing the backend to cancel a long waiting query - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: Killing the backend to cancel a long waiting query
Date
Msg-id 20030921054224.GF3845@filer
Whole thread Raw
In response to Re: Killing the backend to cancel a long waiting query  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Killing the backend to cancel a long waiting query  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Tom Lane wrote:
> "Paulo Scardine" <paulos@cimed.ind.br> writes:
> >> I trust when you say "kill", you really mean "send SIGINT" ...
> 
> > I'm sending a SIGTERM. Would SIGINT be more appropriate?
> 
> Yes --- that would actually cancel the query, not cause the backend to
> shut down.

Ahh...this is very useful information.

Wouldn't it be useful, though, to implement a "KILL" or "CANCEL" SQL
command that takes a backend ID as its argument (and, of course, does
the appropriate checks of whether you're a superuser or the owner of
the backend) and sends the appropriate signal to the target backend?

That would make it possible for users to kill their own runaway queries
without having to run as whatever user PG is running as.


-- 
Kevin Brown                          kevin@sysexperts.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL not ACID compliant?
Next
From: Christopher Kings-Lynne
Date:
Subject: Can't build latest CVS: