Re: Problem with txid_snapshot_in/out() functionality - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Problem with txid_snapshot_in/out() functionality
Date
Msg-id 20140414093256.GT4161@awork2.anarazel.de
Whole thread Raw
In response to Re: Problem with txid_snapshot_in/out() functionality  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On 2014-04-14 12:15:30 +0300, Heikki Linnakangas wrote:
> Hmm. There's a field in GlobalTransactionData called locking_xid, which is
> used to mark the XID of the transaction that's currently operating on the
> prepared transaction. At prepare, that ensures that the transaction cannot
> be committed or rolled back by another backend until the original backend
> has cleared its PGPROC entry. At COMMIT/ROLLBACK PREPARED, it ensures that
> only one backend can commit/rollback the transaction.
> 
> I wonder why we don't use a VirtualTransactionId there.

I wondered about that previously as well. My bet it's because the 2pc
support arrived before the virtualxact stuff...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Problem with txid_snapshot_in/out() functionality
Next
From: Simon Riggs
Date:
Subject: Re: Custom Scan APIs (Re: Custom Plan node)