From: Kevin Brown <kevin@sysexperts.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Killing the backend to cancel a long waiting query
Date: Sat, 20 Sep 2003 22:42:24 -0700
Message-ID: <20030921054224.GF3845@filer> (raw)
In-Reply-To: <1850.1063914850@sss.pgh.pa.us>
References: <Pine.LNX.4.33.0309161858470.30978-100000@leary.csoft.net>
<2054.1063808792@sss.pgh.pa.us>
<3F69A6DE.1050002@bigfoot.com>
<007701c37e0f$4fc1b550$6101a8c0@Paulo>
<1469.1063912128@sss.pgh.pa.us>
<003701c37e19$d36687a0$6101a8c0@Paulo>
<1850.1063914850@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: kevin@sysexperts.com, pgsql-hackers@postgresql.org
Subject: Re: Killing the backend to cancel a long waiting query
In-Reply-To: <20030921054224.GF3845@filer>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox