Re: Two-phase commit issues

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Two-phase commit issues
Date: 2005-05-21 15:57:24
Message-ID: Pine.OSF.4.61.0505211835000.208297@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 19 May 2005, Tom Lane wrote:

> Heikki Linnakangas <hlinnaka(at)iki(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2005-05-21 20:28:32 Minor issues with bitmap
Previous Message Andrew Dunstan 2005-05-21 13:15:23 Re: patches for items from TODO list