Re: Function to kill backend - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Function to kill backend
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE34B687@algol.sollentuna.se
Whole thread Raw
In response to Function to kill backend  ("Magnus Hagander" <mha@sollentuna.net>)
Responses Re: Function to kill backend
List pgsql-hackers
>> 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


pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: Function to kill backend
Next
From: "Magnus Hagander"
Date:
Subject: serial vs parallell regression tests