Re: In-doubt window - Mailing list pgsql-hackers

From Tom Lane
Subject Re: In-doubt window
Date
Msg-id 5706.1066671313@sss.pgh.pa.us
Whole thread Raw
In response to Re: In-doubt window  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
Responses Re: In-doubt window
List pgsql-hackers
"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes:
> On Mon, Oct 20, 2003 at 12:18:44PM -0400, Tom Lane wrote:
>> Another way you can look to see if a transaction has completed is to see
>> if there is still an ExclusiveLock record for it in pg_locks.  For this
>> you need to know the transaction's internal XID, but you can get that
>> from the XMAX of the log record it deleted.  In other words:

> Does this mean there's already a record in the database that (exists &&
> is locked) if and only if the transaction is still in progress?

It's not actually a record in the database ... pg_locks is a view of
internal lock-manager state.  (It's new as of 7.3, BTW; dunno how far
back you want your stuff to work.)  But it will get the job done for
you.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: In-doubt window
Next
From: Dennis Bjorklund
Date:
Subject: Re: Unicode upper() bug still present