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

From Tom Lane
Subject Re: txid_current() forces a real xid
Date
Msg-id 12786.1310397486@sss.pgh.pa.us
Whole thread Raw
In response to txid_current() forces a real xid  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> 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?

GetTopTransactionId (and friends) should only be called in places where
the intent is to assign an xid if we haven't already got one.  I'm not
sure what the use case is for txid_current(), but it's at least
plausible that applications using it would have the same intention.
        regards, tom lane


pgsql-hackers by date:

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