txid_current() forces a real xid - Mailing list pgsql-hackers

From Bruce Momjian
Subject txid_current() forces a real xid
Date
Msg-id 201107111459.p6BExS904875@momjian.us
Whole thread Raw
Responses Re: txid_current() forces a real xid
Re: txid_current() forces a real xid
List pgsql-hackers
Right now, calling txid_current() causes a session to create a
non-virtual xid if not already assigned, so observing the xid creates
it, which seems kind of odd.  Is that intended?  Here is the C code:
TransactionIdGetTopTransactionId(void){    if (!TransactionIdIsValid(TopTransactionStateData.transactionId))
AssignTransactionId(&TopTransactionStateData);   return TopTransactionStateData.transactionId;}
 

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Full GUID support
Next
From: Tom Lane
Date:
Subject: Re: Need help understanding pg_locks