Re: Change pg_cancel_*() to ignore current backend

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
Cc: fabriziomello(at)gmail(dot)com, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change pg_cancel_*() to ignore current backend
Date: 2015-05-20 13:47:15
Message-ID: 4837.1432129635@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> writes:
> On 5/19/15 9:19 PM, Fabrzio de Royes Mello wrote:
>> +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.

The implementation would probably be considerably simpler if you treated
these as separate functions at the SQL/C level, ie overload rather than
try to treat the added parameter as having a default.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-05-20 13:57:05 Issues in Replication Progress Tracking
Previous Message Shulgin, Oleksandr 2015-05-20 13:16:20 [PATCH] Generalized JSON output functions