Re: jdbc xa support - Mailing list pgsql-jdbc

From Heikki Linnakangas
Subject Re: jdbc xa support
Date
Msg-id Pine.OSF.4.61.0507240006230.262180@kosh.hut.fi
Whole thread Raw
In response to Re: jdbc xa support  (Michael Allman <msa@allman.ms>)
Responses Re: jdbc xa support  (Oliver Jowett <oliver@opencloud.com>)
Re: jdbc xa support  (Michael Allman <msa@allman.ms>)
List pgsql-jdbc
On Sat, 23 Jul 2005, Michael Allman wrote:

> On Sat, 23 Jul 2005, Heikki Linnakangas wrote:
>>
>> Just looked at MySQL/InnoDB, they have these commands to deal with XA:
>>
>> XA BEGIN <xid> [JOIN | RESUME]
>> XA START TRANSACTION <xid> [JOIN | RESUME] XA COMMIT <xid> [ONE PHASE]
>> XA END <xid> [SUSPEND [FOR MIGRATE]]
>> XA PREPARE <xid>
>> XA RECOVER
>> XA ROLLBACK <xid>
>>
>> They have all the support in the backend, so their driver implementation is
>> trivial. (Of course, since it's MySQL, I wouldn't bet that they actually
>> work the way they should, but anyway :))
>
> What version of MySQL is this?  I cannot find documentation for these
> commands.

I downloaded a nighlt build of the jdbc driver. The filename seems to be
"mysql-connection-java-3.2-nightly-20050718.tar.gz". Maybe those commands
are so new that they are not documented? Or they are old and undocumented
anyway..

> On a related note, can we get the backend to indicate if a transaction was
> read-only when the "PREPARE TRANSACTION" statement is called?  (Also, I
> believe preparing a read-only transaction should automatically "commit" it.)
> We could then return XA_RDONLY from the driver's prepare() method in that
> case.  As it is, it either throws an exception or returns XA_OK.

It should be possible, but we're already past the feature freeze so it'll
have to wait for version 8.2. The backend already keeps track which
transactions are read-only, and skips updating the clog for them. That
information just needs to be exposed.

- Heikki

pgsql-jdbc by date:

Previous
From: Michael Allman
Date:
Subject: Re: jdbc xa support
Next
From: Oliver Jowett
Date:
Subject: Re: jdbc xa support