Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid) - Mailing list pgsql-jdbc

From Simon Riggs
Subject Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
Date
Msg-id BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.com
Whole thread Raw
In response to Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)  (Justin Bertram <jbertram@redhat.com>)
Responses Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-jdbc
On Wed, Jun 29, 2011 at 8:51 PM, Justin Bertram <jbertram@redhat.com> wrote:

> I had to adjust the patch so that the new variable xaerrcode was passed into the PGXAException constructor (on line
522of the patched code) rather than XAException.XAER_RMERR.  Once that was done recovery worked just as expected.
 Thanksfor 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

pgsql-jdbc by date:

Previous
From: Justin Bertram
Date:
Subject: Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
Next
From: Heikki Linnakangas
Date:
Subject: Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)