Re: PREPARE TRANSACTION compatibility? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: PREPARE TRANSACTION compatibility?
Date
Msg-id 4F887CCC.7070409@enterprisedb.com
Whole thread Raw
In response to Re: PREPARE TRANSACTION compatibility?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 13.04.2012 22:02, Tom Lane wrote:
> Heikki Linnakangas<heikki.linnakangas@enterprisedb.com>  writes:
>> On 13.04.2012 21:43, Peter Eisentraut wrote:
>>> The commands PREPARE TRANSACTION, COMMIT PREPARED, and ROLLBACK PREPARED
>>> are the only ones that do not have a Compatibility section on their
>>> reference page.  Does anyone remember whether they were our invention or
>>> copied from or inspired by some other implementation?
>
>> They are our invention.
>
> Entirely?  I'm quite sure I remember some discussion about compatibility
> of the prepared-transaction GIDs.  There must be at least part of that
> API that's standard.

There's the X/Open standard, and the Java Transaction API (JTA) standard 
that's based on it. There's probably other specs for other languages, 
but those two are what I've looked at. The specs define the client-side 
interface, but they don't say anything about the client-server protocol.

X/Open and JTA have the concept of GIDs, called Xids in the JDBC 
nomenclature. IIRC they have a certain width, and consist of two parts, 
a transaction id, and a branch id. But from the server's point of view, 
the GIDs are just unique identifiers, assigned by the client (= 
transaction manager), with no further special meaning.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.
Next
From: Guillaume Lelarge
Date:
Subject: Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.