Bruce Momjian <bruce(at)momjian(dot)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