Re: Two-phase commit issues - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Two-phase commit issues
Date
Msg-id Pine.OSF.4.61.0505211835000.208297@kosh.hut.fi
Whole thread Raw
In response to Re: Two-phase commit issues  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 19 May 2005, Tom Lane wrote:

> Heikki Linnakangas <hlinnaka@iki.fi> writes:
>
>>> * I'm inclined to think that the "gid" identifiers for prepared
>>> transactions ought to be SQL identifiers (names), not string literals.
>>> Was there a particular reason for making them strings?
>
>> Sure. No Reason. While you're at it, do you think it's possible to make it
>> unlimited size? I couldn't think of a simple way.
>
> Actually, one reason for wanting them to be identifiers is so that
> there's a principled reason for saying what the max length is ;-)

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?

- Heikki


pgsql-hackers by date:

Previous
From: José Orlando Pereira
Date:
Subject: Re: Two-phase commit issues
Next
From: "Greg Sabino Mullane"
Date:
Subject: Minor issues with bitmap