Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yl3Xz-0005pI-6b for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Apr 2015 22:55:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yl3Xy-00037L-LF for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Apr 2015 22:55: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 1Yl2qM-00051A-Lr for pgsql-bugs@postgresql.org; Wed, 22 Apr 2015 22:10:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yl2qJ-0004UE-7P for pgsql-bugs@postgresql.org; Wed, 22 Apr 2015 22:10:05 +0000 MIME-Version: 1.0 Subject: BUG #13128: Postgres deadlock on startup failure when max_prepared_transactions is not sufficiently high. To: pgsql-bugs@postgresql.org From: grant@amazon.com Date: Wed, 22 Apr 2015 22:09:40 +0000 Message-ID: <20150422220940.5216.95902@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.1 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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: 13128 Logged by: Grant McAlister Email address: grant@amazon.com PostgreSQL version: 9.3.6 Operating system: Linux 64bit Description: Steps to reproduce 1. Set max_prepared_transactions to 2 in postgresql.conf. 2. start Postgres. 3. Create two uncommitted prepared transactions: BEGIN; PREPARE TRANSACTION ‘test1’; BEGIN; PREPARE TRANSACTION ‘test2’; 4. Set max_prepared_transactions to 1 in postgresql.conf. 5. Restart Postgres again. At this point the startup will fail with a fatal but the postmaster process keeps running. LOG: database system was interrupted; last known up at 2015-04-16 17:19:56 PDT LOG: database system was not properly shut down; automatic recovery in progress LOG: record with zero length at 0/1826C70 LOG: redo is not required LOG: recovering prepared transaction 1685 LOG: recovering prepared transaction 1683 FATAL: maximum number of prepared transactions reached HINT: Increase max_prepared_transactions (currently 1). Looks like their may be a LWLock that is not correctly getting released which causes the process to hang rather then exit. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs