From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: In-doubt window |
Date: | 2003-10-20 17:35:13 |
Message-ID: | 5706.1066671313@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Jeroen T. Vermeulen" <jtv(at)xs4all(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Dennis Bjorklund | 2003-10-20 18:00:13 | Re: Unicode upper() bug still present |
Previous Message | Jean-Michel POURE | 2003-10-20 17:28:25 | Re: [HACKERS] Mapping Oracle types to PostgreSQL types |