Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Justin Bertram <jbertram(at)redhat(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
Date: 2011-06-29 20:07:32
Message-ID: BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wed, Jun 29, 2011 at 8:51 PM, Justin Bertram <jbertram(at)redhat(dot)com> wrote:

> I had to adjust the patch so that the new variable xaerrcode was passed into the PGXAException constructor (on line 522 of the patched code) rather than XAException.XAER_RMERR.  Once that was done recovery worked just as expected.  Thanks for your work on this!

Interesting. We've been looking at exactly that error as well and were
just about to submit a similar, but different patch.

My understanding is that if the TM requests rollback of a transaction
and then the database crashes before it can reply, the TM may request
rollback a second time. If the first rollback did actually remove the
transaction this then replies that the transaction is unknown. So
XAER_RMERR is exactly the wrong error in some cases of 42704.

Thoughts?

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Heikki Linnakangas 2011-06-30 12:00:30 Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
Previous Message Justin Bertram 2011-06-29 19:51:29 Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)