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

From Radosław Smogura
Subject Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
Date
Msg-id 201107050812.59178.rsmogura@softperience.eu
Whole thread Raw
In response to Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)  ("Johann 'Myrkraverk' Oskarsson" <johann@2ndquadrant.com>)
Responses Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-jdbc
"Johann 'Myrkraverk' Oskarsson" <johann@2ndquadrant.com> Tuesday 05 of July
2011 00:02:38
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> > Well, if the transaction has been rolled back, it's clearly not in
> > prepared state anymore, so XAER_RMERR seems appropriate and the TM
> > shouldn't get upset about that. However, the situation is more
> > ambiguous if the TM issues COMMIT PREPARED and the connection is
> > broken before receiving a reply. It will retry, and if the the
> > COMMIT succeeded the first time, the TM will get XAER_RMERR on the
> > second call. That's more serious.
>
> There is no reason to return an error on rollback if the transaction
> is unknown.  If the DBMS server does not remember the transaction the
> transaction manager can assume it has already been rolled back.  That
> is why it is appropriate to silently ignore 42704 or rollback.  The
> following patch does this.
>
> This patch fixes a failure in a testsuite from Atomikos.
I may be wrong, but may VACUUM remove transactions statuses? What will happen
in this situation if transaction will be prepared, commited or rolledback?

Regards,
Radek

pgsql-jdbc by date:

Previous
From: "Johann 'Myrkraverk' Oskarsson"
Date:
Subject: Re: Possible oversight in org.postgresql.xa.PGXAConnection.commitPrepared(Xid xid)
Next
From: Maciek Sakrejda
Date:
Subject: Re: Question about passing array of a complex type from jdbc to plpgsql