Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XxwZ4-0006gU-5E for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Dec 2014 11:33:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XxwZ3-0004Tx-K7 for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Dec 2014 11:33:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XxwZ3-0004Tr-0L for pgsql-bugs@postgresql.org; Mon, 08 Dec 2014 11:33:17 +0000 Received: from mx3-phx2.redhat.com ([209.132.183.24]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XxwYx-0004WF-RH for pgsql-bugs@postgresql.org; Mon, 08 Dec 2014 11:33:15 +0000 Received: from zmail16.collab.prod.int.phx2.redhat.com (zmail16.collab.prod.int.phx2.redhat.com [10.5.83.18]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id sB8BX9jf019149 for ; Mon, 8 Dec 2014 06:33:09 -0500 Date: Mon, 8 Dec 2014 06:33:08 -0500 (EST) From: Ondrej Chaloupka To: pgsql-bugs Message-ID: <1259946913.22869617.1418038388941.JavaMail.zimbra@redhat.com> In-Reply-To: <988140921.22868556.1418038046589.JavaMail.zimbra@redhat.com> Subject: Incorrect return code for error on call of commit during 2PC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.5.82.12] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF34 (Linux)/8.0.6_GA_5922) Thread-Topic: Incorrect return code for error on call of commit during 2PC Thread-Index: zKN8HTknMLQwBe0OPV+Kw+j0XJMUJA== X-Pg-Spam-Score: -6.9 (------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org I'm sorry for spamming the mailing list with incomplete messages. It seems = that my 'enter' function does not work correctly :) it seems that PostgreSQL jdbc driver returns incorrect code during on call = of commit during 2PC. Currently the driver returns XAER_RMERR. I expect that it's this call https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/xa/PGXAConnecti= on.java#L528 But the XA spec (http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf) sa= ys for XAER_RMERR that "An error occurred in committing the work performed on behalf of the transa= ction branch and the branch=E2=80=99s work has been rolled back. Note that return= ing this error signals a catastrophic event to a transaction manager since other resource managers may successfully commit their work on behalf of this branch. This = error should be returned only when a resource manager concludes that it can never commit the branch and that it cannot hold the branch=E2=80=99s resources in= a prepared state. Otherwise, [XA_RETRY] should be returned." In case there is longer discussion about scenario hitting this issue and ab= out handling this at RedHat bugzilla here: https://bugzilla.redhat.com/show_bug.cgi?id=3D988724