Re: Postgres XA support

From: Michael Allman <msa(at)allman(dot)ms>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Postgres XA support
Date: 2005-08-15 23:01:09
Message-ID: 20050815183722.E59739@yvyyl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Heikki,

After reviewing my code, I am beginning to doubt that PostgreSQL, even
with the new two-phase commit support, will support the XA protocol.

Key to the protocol is the ability to start and end the association of
transactions to threads of control. In particular, what's bothering me is
that there appears to be no way to end the transaction association of the
current postgres connection, either permanently or for suspension.
Please correct me if I'm wrong.

Thus work performed using the underlying physical connection of a
PGXAResource unassociated with any transaction will still be performed on
the connection's transaction.

I'm going to halt my work on the postgres jdbc xa support until I see a
way out.

I think it might take Postgres implementing the C language xa routines
from the DTP XA spec to implement XA support at the JDBC level. If
postgres supports XA on the backend, then we should be able to implement
JDBC XA with some simple pass-throughs to stored procedures. I think this
is what Oracle does.

I am not at all a C hacker, but the problem is interesting, and if I get
some time I'll look into hacking up the server-side xa support. I think
the difficulty will be directly related to how tightly transactions are
coupled to threads on the backend.

Michael

On Mon, 15 Aug 2005, Heikki Linnakangas wrote:

> Hi Michael,
>
> What's the status of you XA implementation? Are you still working on it?
>
> - Heikki
>

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-08-16 00:12:31 Re: Postgres XA support
Previous Message Dave Cramer 2005-08-13 11:51:25 Re: problem with stored procedure ,transaction and jdbc