Re: pg_terminate_backend idea - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_terminate_backend idea
Date
Msg-id 20115.1119465568@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_terminate_backend idea  (Andrew - Supernews <andrew+nonews@supernews.com>)
List pgsql-hackers
Andrew - Supernews <andrew+nonews@supernews.com> writes:
> On 2005-06-22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Andreas Pflug <pgadmin@pse-consulting.de> writes:
>>> I've seen cancel *not* working.
>> 
>> Even a moment's perusal of the code will prove that there is no
>> situation in which a backend will respond to SIGTERM but not SIGINT

> "idle in transaction". (or "idle" for that matter, but that's usually less
> significant.)

In that case there's no query to cancel, so I would dispute the claim
that that constitutes "not working".  QueryCancel is defined to cancel
the current query, not necessarily to abort your whole transaction.
(Before 8.0 there wasn't much of a difference, but now there is:
QueryCancel is an ordinary error that can be trapped by a savepoint.
Are you arguing it should not be so trappable?)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew - Supernews
Date:
Subject: Re: pg_terminate_backend idea
Next
From: Greg Stark
Date:
Subject: Re: [PATCHES] O_DIRECT for WAL writes