pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ondrej Chaloupka <ochaloup@redhat.com>
To: pgsql-general@postgresql.org
To: pgsql-bugs@postgresql.org
Cc: Pavel Raiskup <praiskup@redhat.com>
Cc: Tom Jenkinson <tom.jenkinson@redhat.com>
Subject: Incorrect response code after XA recovery
Date: Mon, 29 Jul 2013 09:33:44 -0400 (EDT)
Message-ID: <399053975.7952081.1375104824437.JavaMail.root@redhat.com> (raw)
In-Reply-To: <1603079961.7916219.1375102521553.JavaMail.root@redhat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Hi,

I would like to consult with you a problematic response put by PostgreSQL after transaction recovery run by Narayana (JBossTS).

I work on tests for Narayana and I hit a issue with PostgreSQL. The db returns incorrect code XAException.XA_HEURHAZ when the TM does recovery after crash of the jboss eap app server.
The exception is following:
Caused by: org.postgresql.util.PSQLException: ERROR: prepared transaction with identifier "131072_AAAAAAAAAAAAAP//fwAAAd7TXOBR8jj5AAAAKDE=_AAAAAAAAAAAAAP//fwAAAd7TXOBR8jj5AAAALQAAAAAAAAAA" does not exist

It's run on PostgreSQL 9.2 but the older versions seem to be affected as well.

The problem occurs when TM runs on JTS transactions.

The idea of the test:
The test enlists two resources to a transaction. There is called prepare on resource of PostgreSQL. The app server crashes before prepare is called on second transaction participant. After restart of the app server TM tries to recover the transaction. As the fail occurs during prepare phase rollback is expected.

The OTS specification requires both bottom up and top down recovery to be triggered by the recovering resource. This causes that two rollback calls are done against the DB. DB receives rollback call and does the rollback. Then for the second time it returns the exceptional code. As the DB already rollbacked the transaction and forgot about it the DB returns error that no such transaction exists. But this seems to be against OTS specification.
There are some more details in the following bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=988724

Do you have some experience with such behaviour? Can I suppose this being problem of PostgreSQL? Or is there already some bug for this issue in Postgres bugtracking system?

Thank you
Ondra


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



view thread (13+ messages)  latest in thread

Message-ID: <399053975.7952081.1375104824437.JavaMail.root@redhat.com>
Permalink:  ../399053975.7952081.1375104824437.JavaMail.root@redhat.com/
Also on:    postgresql.org/message-id/399053975.7952081.1375104824437.JavaMail.root@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, pgsql-general@postgresql.org, pgsql-bugs@postgresql.org, praiskup@redhat.com, tom.jenkinson@redhat.com
  Subject: Re: Incorrect response code after XA recovery
  In-Reply-To: <399053975.7952081.1375104824437.JavaMail.root@redhat.com>
  References: <1603079961.7916219.1375102521553.JavaMail.root@redhat.com> <399053975.7952081.1375104824437.JavaMail.root@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