Re: Cancel/Kill backend functions - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Cancel/Kill backend functions
Date
Msg-id 20040527183033.GA3107@dcc.uchile.cl
Whole thread Raw
In response to Re: Cancel/Kill backend functions  ("Magnus Hagander" <mha@sollentuna.net>)
List pgsql-patches
On Thu, May 27, 2004 at 08:08:34PM +0200, Magnus Hagander wrote:

> >Magnus Hagander wrote:
> >> Okay, here is an updated patch. now uses IsBackendPid(), which is
> >> closely modeled (read cut-and-pasted) from
> >> TransactionIdIsInProgress().

I wonder what can happen if a backend passes the IsBackendPid() test and
terminates just before the kill() signal?  It should be pretty unlikely
but you could signal the wrong process ... shouldn't the SInvalLock be
held throughout the whole operation?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El número de instalaciones de UNIX se ha elevado a 10,
y se espera que este número aumente" (UPM, 1972)


pgsql-patches by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: Cancel/Kill backend functions
Next
From: "Magnus Hagander"
Date:
Subject: Re: Cancel/Kill backend functions