Re: Two-phase commit issues

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Alvaro Herrera <alvherre(at)surnet(dot)cl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Two-phase commit issues
Date: 2005-06-11 08:08:14
Message-ID: Pine.OSF.4.61.0506111051280.325695@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 7 Jun 2005, Alvaro Herrera wrote:

> On Sat, May 21, 2005 at 06:57:24PM +0300, Heikki Linnakangas wrote:
>
> Heikki,
>
>> I took a closer look at the JTA spec and saw that the Xid, which is
>> translated to a gid in the jdbc driver, consists of a format identifier
>> (32-bit int), a branch qualifier (max 64 bytes) and a global transaction
>> identifier (max 64 bytes).
>>
>> That means that gid needs to hold 132 raw bytes minimum.
>>
>> Also, it would be nice if the driver could send the gid as a bytea,
>> without converting it to a string. Similar to using parameter markers
>> and parse / bind messages with regular queries. That would require a
>> change in the FE/BE protocol, right?
>>
>> The branch qualifier and global transaction id structure comes from
>> the OSI CCR specification. Anyone here that knows more about OSI CCR?
>
> I think I'm going to try to do this by hacking the lexer some (this has
> the added benefit of me learning a little about lexers). Do you have an
> URL to those specs you mention? How authoritative they are, I mean,
> they are not the SQL spec, right?

The JTA spec
http://java.sun.com/products/jta/

Relevant X/Open XA documents:
http://www.opengroup.org/bookstore/catalog/tp.htm

See especially page 19 of the "Distributed Transaction Processing: The XA
Specification", it contains xa.h header file that specifies the format of
the transaction identifier.

It matches with the format in the JTA spec, but the JTA spec also mentions
the OCI CCR format which I haven't been able to find:
http://java.sun.com/products/jta/jta-1_0_1B-doc/javax/transaction/xa/Xid.html

In addition to those two, I bumped into RFC2371. It basically allows
any format.

I don't have access to the SQL spec, so I can't comment on that. I'd
regard the XA spec as the most authoritative standard in the field.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yann Michel 2005-06-11 08:49:26 Re: User Quota Implementation
Previous Message Kaare Rasmussen 2005-06-11 07:10:31 Re: The Contrib Roundup (long)