pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeremy Whiting <jwhiting@redhat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tom Jenkinson <tom.jenkinson@redhat.com>
Cc: Ondrej Chaloupka <ochaloup@redhat.com>
Cc: pgsql-jdbc@postgresql.org, pgsql-bugs@postgresql.org, Pavel Raiskup <praiskup@redhat.com>
Subject: Re: [BUGS] Incorrect response code after XA recovery
Date: Wed, 31 Jul 2013 12:36:51 +0100
Message-ID: <51F8F6D3.30500@redhat.com> (raw)
In-Reply-To: <26470.1375110681@sss.pgh.pa.us>
References: <399053975.7952081.1375104824437.JavaMail.root@redhat.com>
	<25825.1375105824@sss.pgh.pa.us>
	<51F679F6.4080504@redhat.com>
	<26246.1375109172@sss.pgh.pa.us>
	<51F682DF.9020806@redhat.com>
	<26470.1375110681@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Hi Tom,
 The driver currently doesn't report back to the calling client (tm)
XAException.XAER_NOTA code as Ondrej and Tom Jenkinson have identified.
Instead it returns XAException.XAER_RMERR. See line 416

https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/xa/PGXAConnection.java#416

 which imo is used for general errors in the resource manager.

 I've written a test case that can be pulled into the pgjdbc testsuite
that will make verifying this error easier. It is based on the example
code Tom Jenkinson provided. A pull request has been created which can
be found here...

https://github.com/pgjdbc/pgjdbc/pull/73

 I am currently coding up a change to the driver in anticipation there
is agreement in the pgjdbc group to change the rollback method. Another
pull request will be created for that. Let's see what discussion and
decision is made by the more active members in pgjdbc.

Regards,
Jeremy

On 29/07/13 16:11, Tom Lane wrote:
> Tom Jenkinson <tom.jenkinson@redhat.com> writes:
>> On Mon 29 Jul 2013 15:46:12 BST, Tom Lane wrote:
>>> No idea, but in any case that's outside Postgres' purview.  It's barely
>>> possible that the Postgres JDBC driver has something to do with that,
>>> but it sounds more like the XA manager's turf.
>> I am not sure what you mean here as I don't know the structure of how 
>> the PostGres project is packaged, all I know is that the PostGres JDBC 
>> driver component appears to be returning an XAException with the 
>> message "Error rolling back prepared transaction" and an errorCode of 
>> XAException.XAER_RMERR rather than XAER_NOTA.
>> Is there a different component within your bug tracking system  we 
>> should be using to raise this against the JDBC driver instead?
> The folk who would fix anything in the JDBC driver tend to read
> pgsql-jdbc sooner than pgsql-bugs, so cc'ing there for comment.
>
> 			regards, tom lane
>
>




-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (13+ messages)  latest in thread

Message-ID: <51F8F6D3.30500@redhat.com>
Permalink:  ../51F8F6D3.30500@redhat.com/
Also on:    postgresql.org/message-id/51F8F6D3.30500@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: jwhiting@redhat.com, tgl@sss.pgh.pa.us, tom.jenkinson@redhat.com, ochaloup@redhat.com, praiskup@redhat.com
  Subject: Re: [BUGS] Incorrect response code after XA recovery
  In-Reply-To: <51F8F6D3.30500@redhat.com>
  References: <399053975.7952081.1375104824437.JavaMail.root@redhat.com> <25825.1375105824@sss.pgh.pa.us> <51F679F6.4080504@redhat.com> <26246.1375109172@sss.pgh.pa.us> <51F682DF.9020806@redhat.com> <26470.1375110681@sss.pgh.pa.us> <51F8F6D3.30500@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