Re: Change pg_cancel_*() to ignore current backend - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Change pg_cancel_*() to ignore current backend
Date
Msg-id CA+TgmoYB=_bQKnBVKrgPcBUXhntC5ztnTSGY+qkdEcnSenDLzQ@mail.gmail.com
Whole thread Raw
In response to Re: Change pg_cancel_*() to ignore current backend  (Andres Freund <andres@anarazel.de>)
Responses Re: Change pg_cancel_*() to ignore current backend  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On Wed, May 20, 2015 at 8:46 PM, Andres Freund <andres@anarazel.de> wrote:
> I've a hard time believing it's actually a good idea to change this. It
> pretty much seems to only be useful if you're doing unqualified SELECT
> pg_cancel_backend(pid) FROM pg_stat_activity; type queries. I don't see
> that as something we need to address.

+1.  I'm not saying this isn't annoying - I've been annoyed by it
myself - but IMHO it's really not worth having two functions that do
99% the same thing.  Then, instead of having to remember to exclude
your own backend using the same SQL syntax you use for everything
else, you have to remember which of two similarly-named functions to
call if you don't want to kill your own backend.  That might be better
for some people, but it won't be better for everyone.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Grigory Kareev
Date:
Subject: Add support for interface/ipaddress binding to libpq
Next
From: Dean Rasheed
Date:
Subject: Re: GROUPING