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