pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ondrej Chaloupka <ochaloup@redhat.com>
To: pgsql-jdbc@postgresql.org
Subject: Incorrect return code for error on call of commit during 2PC
Date: Wed, 10 Dec 2014 03:08:41 -0500 (EST)
Message-ID: <804581036.23979739.1418198921811.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1839434978.23979421.1418198887715.JavaMail.zimbra@redhat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Hi,

it seems that PostgreSQL jdbc driver returns incorrect code 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/PGXAConnection.java#L528

But the XA spec (http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf) says for XAER_RMERR that
"An error occurred in committing the work performed on behalf of the transaction
branch and the branch’s work has been rolled back. Note that returning 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’s resources in a prepared
state. Otherwise, [XA_RETRY] should be returned."

In case there is longer discussion about scenario hitting this issue and about handling this at RedHat bugzilla here:
https://bugzilla.redhat.com/show_bug.cgi?id=988724



view thread (2+ messages)  latest in thread

Message-ID: <804581036.23979739.1418198921811.JavaMail.zimbra@redhat.com>
Permalink:  ../804581036.23979739.1418198921811.JavaMail.zimbra@redhat.com/
Also on:    postgresql.org/message-id/804581036.23979739.1418198921811.JavaMail.zimbra@redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: ochaloup@redhat.com
  Subject: Re: Incorrect return code for error on call of commit during 2PC
  In-Reply-To: <804581036.23979739.1418198921811.JavaMail.zimbra@redhat.com>
  References: <1839434978.23979421.1418198887715.JavaMail.zimbra@redhat.com> <804581036.23979739.1418198921811.JavaMail.zimbra@redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox