Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XsWLo-0006PQ-1t for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Nov 2014 12:33:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XsWLm-0003gY-IK for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Nov 2014 12:33:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XsWLk-0003gP-Jr for pgsql-bugs@postgresql.org; Sun, 23 Nov 2014 12:33:08 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XsWLg-0001OQ-FW for pgsql-bugs@postgresql.org; Sun, 23 Nov 2014 12:33:06 +0000 MIME-Version: 1.0 Subject: BUG #12035: Prepared Transactions cannot be ROLLBACKed To: pgsql-bugs@postgresql.org From: ludwig.adam@petafuel.de Date: Sun, 23 Nov 2014 12:32:28 +0000 Message-ID: <20141123123228.15507.82506@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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