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
>