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 5BAAA528A6 for ; Thu, 30 Jun 2005 20:05:24 -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 42721-09 for ; Thu, 30 Jun 2005 23:05:23 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 023DC5281B for ; Thu, 30 Jun 2005 20:05:21 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Do85x-0006Iu-6R; Fri, 01 Jul 2005 11:05:22 +1200 Message-ID: <42C47AAA.2010302@opencloud.com> Date: Fri, 01 Jul 2005 11:05:14 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Heikki Linnakangas Cc: pgsql-jdbc@postgresql.org Subject: Re: XA support References: <42C31E54.20000@opencloud.com> In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/182 X-Sequence-Number: 13144 Heikki Linnakangas wrote: > This is essentially impossible with approach B, if the ... part uses the > connection for some other xid. Otherwise, should work. Right, I was thinking about implications for the other approaches. > Note that the XA term "thread of control" actually means a connection in > JTA terms. It doesn't make any difference which java thread does work. > See JTA spec, section 3.4.3. Ah, ok, that makes a lot more sense then :-) > I'm leaning towards approach C myself [...] Blocking seems really dangerous :( It seems quite likely that you could deadlock against yourself.. > since it's the simplest to > implement and doesn't cause any unexpected prepares. Yeah, I thought some more about that and B is really bad from the unexpected prepare angle. If we're preparing before the TM asks us to (and therefore have transaction showing up as prepared in recovery) it seems possible that a TM will incorrectly decide to commit those after recovery. > Or possibly even violating the spec and not allowing to start another transaction before the previous one has been prepared. This actually sounds like the best thing now as it produces obvious, easy-to-diagnose errors when you do something that the driver doesn't yet support. -O