>> Killing backends with runaway queries is a routine administrative
>> task.
>
>Cancelling runaway queries is a routine task.  I'm less 
>convinced that a
>remote kill (ie SIGTERM) facility is such a great idea.

Consider a scenario like:
User A starts transaction.
User A issues a LOCK TABLE (or does something to lock it)
User A goes on vacation without commit/rollback

User A might well be Program A instead, of course. Caught in a tight
loop, waiting for user input, or whatever.

In this case, SIGINT (query cancel) will not help, because all locks
held by the transaction will still be held. 

If there was a way to "force rollback" a connection, that could be done.
Buf AFAIK there are none? And would those be safer/better than
terminating the backend?

//Magnus

Sun, 4 Apr 2004 14:19:21 +0200
"Magnus Hagander" <mha@sollentuna.net>
Re: Function to kill backend 
"Magnus Hagander" <mha@sollentuna.net> writes:
> In this case, SIGINT (query cancel) will not help, because all locks
> held by the transaction will still be held. 

Wrong.

			regards, tom lane

Sun, 04 Apr 2004 22:23:46 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Function to kill backend 