Re: Killing the backend to cancel a long waiting query

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Killing the backend to cancel a long waiting query
Date: 2003-09-21 05:42:24
Message-ID: 20030921054224.GF3845@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces pgsql-odbc

Tom Lane wrote:
> "Paulo Scardine" <paulos(at)cimed(dot)ind(dot)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(at)sysexperts(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-09-21 06:06:51 Can't build latest CVS:
Previous Message Tom Lane 2003-09-21 02:25:22 Re: [GENERAL] Can't Build 7.3.4 on OS X

Browse pgsql-interfaces by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-09-21 06:25:16 Re: Killing the backend to cancel a long waiting query
Previous Message Brett Schwarz 2003-09-21 05:14:27 Re: Pgacces - Unable to alloc ... bytes

Browse pgsql-odbc by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-09-21 06:25:16 Re: Killing the backend to cancel a long waiting query
Previous Message Johann Zuschlag 2003-09-20 21:17:20 odbc.sql