Re: obtaining row locking information - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: obtaining row locking information
Date
Msg-id 20050820.090854.39154716.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: obtaining row locking information  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
> On Fri, Aug 19, 2005 at 09:19:24PM +0900, Tatsuo Ishii wrote:
> > > Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> > > > To accomplish this I need to add following function into
> > > > storage/ipc/procarray.c. This is similar to BackendPidGetProc() except
> > > > that it accepts xid as an argument. Any objection?
> 
> I don't think it is critical for it to return valid answers for
> subtransactions, but maybe you should add a note in the commentary about
> it:
> 
> > /*
> >  * BackendXidGetPid -- get a backend's pid given its XID
> >  *
> >  * Returns 0 if not found or it's a prepared transaction.  Note that
> >  * it is up to the caller to be sure that the question remains
> >  * meaningful for long enough for the answer to be used ...
>    * 
>    * Only main transaction Ids are considered.  This function is mainly
>    * useful for determining what backend owns a lock.
> >  */
> > int
> > BackendXidGetPid(TransactionId xid)
> > {

Good point. I will add your comments.
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Beta timing
Next
From: Alvaro Herrera
Date:
Subject: Re: Why is lock not released?