X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6C4165284F for ; Tue, 16 Aug 2005 00:06:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 23949-10 for ; Tue, 16 Aug 2005 03:06:42 +0000 (GMT) Received: from mail102.csoft.net (lilly.csoft.net [63.111.22.101]) by svr1.postgresql.org (Postfix) with SMTP id 0545E5281E for ; Tue, 16 Aug 2005 00:06:39 -0300 (ADT) Received: (qmail 179 invoked by uid 3922); 16 Aug 2005 03:06:38 -0000 Date: Mon, 15 Aug 2005 23:06:38 -0400 (EDT) From: Michael Allman To: Oliver Jowett Cc: Heikki Linnakangas , pgsql-jdbc@postgresql.org Subject: Re: Postgres XA support In-Reply-To: <43012F6F.3020709@opencloud.com> Message-ID: <20050815225120.I62442@yvyyl> References: <20050815183722.E59739@yvyyl> <43012F6F.3020709@opencloud.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200508/98 X-Sequence-Number: 13667 On Tue, 16 Aug 2005, Oliver Jowett wrote: > Michael Allman wrote: > >> 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. > > You'll need another layer to support all of XA's behaviour -- this was > the discussion about mapping XA connections to physical connections that > happened on the list a while back, wasn't it? > > It's probably unnecessary for the first cut, though. What exactly is the > behaviour that you can't support without that extra layer, and is it > needed for common use of XA? Seems to me that you could get away with > just disallowing work on a Connection that has an unprepared XA > transaction pending. You can do something like that to flag unsupported behavior, but I think that without the ability to suspend and resume transaction branch association, the JDBC XA support will not graduate from "experimental" status. I couldn't confidently recommend it for production use, and I wrote the damn thing. I am pretty much decided that the JDBC XA support will require another approach. If you really want to use my patchset, I will at least upload the latest version which includes some fixes and more verbose XAExceptions. But I'm not sold on it myself anymore. I think JDBC XA is going to require a lot more work. The server-side 2PC support coming in postgres 8.1 is a good thing, but it's not XA. Michael