Re: jdbc xa support

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Michael Allman <msa(at)allman(dot)ms>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: jdbc xa support
Date: 2005-07-23 21:12:49
Message-ID: Pine.OSF.4.61.0507240006230.262180@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-07-23 23:28:06 Re: jdbc xa support
Previous Message Michael Allman 2005-07-23 17:06:03 Re: jdbc xa support