pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ludwig.adam@petafuel.de
To: pgsql-bugs@postgresql.org
Subject: BUG #12035: Prepared Transactions cannot be ROLLBACKed
Date: Sun, 23 Nov 2014 12:32:28 +0000
Message-ID: <20141123123228.15507.82506@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      12035
Logged by:          Ludwig Adam
Email address:      ludwig.adam@petafuel.de
PostgreSQL version: 9.1.14
Operating system:   on x86_64-unknown-linux-gnu, com (Ubuntu 12.04 LTS
Description:        

Hi,

Matheus0l on #postgresql asked me to file a bug on this: Our setup is two
postgres servers in streaming replication controlled by pgpool II. After a
failover (i.e. slave got promoted) we had around 16 Prepared Transactions in
pg_prepared_xacts for the new master, locking some tables. 

However we were unable to Perform "ROLLBACK prepared 'gid'"- it gave us the
error message:"
ERROR: cannot rollback prepared transaction 'gid'- transaction is busy."

I can confirm that there were no backend processes trying to ROLLBACK or
COMMIT at the same time- issue persisted with all backend connections
disconnected.

We then did a base-backup and restarted replication to the former master.
During replication, the prepared transactions were not present, however,
once we promoted that server to master, the transactions were there again
and could not be ROLLBACKed either.

After discussions on #postgresql we finally resolved this by setting up
another base backup, deleting the corresponding state files in pg_twophase
and promoting to master. The new master did not have these transactions
listed any longer.

Please feel free to get in touch with me, should you have any questions for
specifics.

Ludwig


-- 
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 (2+ messages)  latest in thread

Message-ID: <20141123123228.15507.82506@wrigleys.postgresql.org>
Permalink:  ../20141123123228.15507.82506@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20141123123228.15507.82506@wrigleys.postgresql.org

 · 

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-bugs@postgresql.org
  Cc: ludwig.adam@petafuel.de
  Subject: Re: BUG #12035: Prepared Transactions cannot be ROLLBACKed
  In-Reply-To: <20141123123228.15507.82506@wrigleys.postgresql.org>
  References: <20141123123228.15507.82506@wrigleys.postgresql.org>

* 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