pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Justin Bertram <jbertram@redhat.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>
Subject: Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
Date: Wed, 29 Jun 2011 21:07:32 +0100
Message-ID: <BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.com> (raw)
In-Reply-To: <147817721.851047.1309377089469.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
References: <4E0AEFDB.30701@enterprisedb.com>
	<147817721.851047.1309377089469.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>

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 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



view thread (12+ messages)  latest in thread

Message-ID: <BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.com>
Permalink:  ../BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.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: simon@2ndQuadrant.com, jbertram@redhat.com, heikki.linnakangas@enterprisedb.com
  Subject: Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
  In-Reply-To: <BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.com>
  References: <4E0AEFDB.30701@enterprisedb.com> <147817721.851047.1309377089469.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> <BANLkTinLfz4fa1sOFjiNXapjG_zU76HeYg@mail.gmail.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