Re: Two-phase commit issues
От | Heikki Linnakangas |
---|---|
Тема | Re: Two-phase commit issues |
Дата | |
Msg-id | Pine.OSF.4.61.0505211835000.208297@kosh.hut.fi обсуждение исходный текст |
Ответ на | Re: Two-phase commit issues (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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 по дате отправления: