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 446C852A55 for ; Sat, 23 Jul 2005 20:28: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 30532-06 for ; Sat, 23 Jul 2005 23:28:18 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 999B452A02 for ; Sat, 23 Jul 2005 20:28:17 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.21]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DwTPc-0005FH-1F; Sun, 24 Jul 2005 11:28:08 +1200 Message-ID: <42E2D286.2060700@opencloud.com> Date: Sat, 23 Jul 2005 23:28:06 +0000 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Heikki Linnakangas Cc: Michael Allman , pgsql-jdbc@postgresql.org Subject: Re: jdbc xa support References: <20050719193245.D20902@yvyyl> <20050720211921.V54984@yvyyl> <20050721203342.W75792@yvyyl> <20050722144451.T5605@yvyyl> <20050723122637.Y55069@yvyyl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 200507/272 X-Sequence-Number: 13420 Heikki Linnakangas wrote: >> 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. If the client uses Connection.setReadOnly() presumably we can track that in the driver, which will catch some of the cases at least. -O