Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 905ACB5D8C5 for ; Tue, 5 Jul 2011 03:13:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 38053-06 for ; Tue, 5 Jul 2011 06:13:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.softperience.eu (static-ip-217-118-26-141.inaddr.intergenia.de [217.118.26.141]) by mail.postgresql.org (Postfix) with ESMTP id 6CE8BB5D80A for ; Tue, 5 Jul 2011 03:12:59 -0300 (ADT) Received: from radek.localnet (ceb247.neoplus.adsl.tpnet.pl [83.30.177.247]) by mail.softperience.eu (Postfix) with ESMTPA id A71E4C0007A; Tue, 5 Jul 2011 08:13:03 +0200 (CEST) From: =?utf-8?q?Rados=C5=82aw_Smogura?= To: pgsql-jdbc@postgresql.org Subject: Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid) Date: Tue, 5 Jul 2011 08:12:59 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.38-gentoo-r6; KDE/4.6.3; x86_64; ; ) Cc: "Johann 'Myrkraverk' Oskarsson" References: <4E0AEFDB.30701@enterprisedb.com> <4E0C655E.8000307@enterprisedb.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201107050812.59178.rsmogura@softperience.eu> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201107/3 X-Sequence-Number: 22007 "Johann 'Myrkraverk' Oskarsson" Tuesday 05 of July 2011 00:02:38 > Heikki Linnakangas writes: > > Well, if the transaction has been rolled back, it's clearly not in > > prepared state anymore, so XAER_RMERR seems appropriate and the TM > > shouldn't get upset about that. However, the situation is more > > ambiguous if the TM issues COMMIT PREPARED and the connection is > > broken before receiving a reply. It will retry, and if the the > > COMMIT succeeded the first time, the TM will get XAER_RMERR on the > > second call. That's more serious. > > There is no reason to return an error on rollback if the transaction > is unknown. If the DBMS server does not remember the transaction the > transaction manager can assume it has already been rolled back. That > is why it is appropriate to silently ignore 42704 or rollback. The > following patch does this. > > This patch fixes a failure in a testsuite from Atomikos. I may be wrong, but may VACUUM remove transactions statuses? What will happen in this situation if transaction will be prepared, commited or rolledback? Regards, Radek