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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to