Re: Change pg_cancel_*() to ignore current backend

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, "david(dot)g(dot)johnston(at)gmail(dot)com >> David G Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Subject: Re: Change pg_cancel_*() to ignore current backend
Date: 2015-05-21 12:12:20
Message-ID: CA+TgmoYB=_bQKnBVKrgPcBUXhntC5ztnTSGY+qkdEcnSenDLzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 20, 2015 at 8:46 PM, Andres Freund <andres(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2015-05-21 12:22:18 Re: GROUPING
Previous Message Grigory Kareev 2015-05-21 11:50:30 Add support for interface/ipaddress binding to libpq