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

From David Steele
Subject Re: Change pg_cancel_*() to ignore current backend
Date
Msg-id 555C7306.6060506@pgmasters.net
Whole thread Raw
In response to Re: Change pg_cancel_*() to ignore current backend  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: Change pg_cancel_*() to ignore current backend
Re: Change pg_cancel_*() to ignore current backend
List pgsql-hackers
On 5/20/15 1:40 AM, Jim Nasby wrote:
> On 5/19/15 9:19 PM, Fabrízio de Royes Mello wrote:
>>     We could add a second parameter to the current functions:
>>     allow_own_pid DEFAULT false. To me that seems better than an
>>     entirely separate set of functions.
>>
>>
>> +1 to add a second parameter to current functions.
>
> Instead of allow_own_pid, I went with skip_own_pid. I have the function
> still returning true even when it skips it's own PID... that seems a bit
> weird, but I think it's better than returning false. Unless someone
> thinks it should return NULL, but I don't see that as any better either.

+1.  I agree that cancelling/killing your own process should not be the
default behavior.

--
- David Steele
david@pgmasters.net


pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: Change pg_cancel_*() to ignore current backend
Next
From: Dave Cramer
Date:
Subject: Re: Problems with question marks in operators (JDBC, ECPG, ...)