Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 190491337B4F for ; Thu, 17 Feb 2011 08:11:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 63321-02 for ; Thu, 17 Feb 2011 12:11:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 7100B1336FA7 for ; Thu, 17 Feb 2011 08:11:57 -0400 (AST) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p1HCBu0p050045 for ; Thu, 17 Feb 2011 12:11:56 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p1HCBuMG050044; Thu, 17 Feb 2011 12:11:56 GMT (envelope-from www) Date: Thu, 17 Feb 2011 12:11:56 GMT Message-Id: <201102171211.p1HCBuMG050044@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5892: Restart Failed after WAL restore From: "Harsh Sinha" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201102/156 X-Sequence-Number: 29428 The following bug has been logged online: Bug reference: 5892 Logged by: Harsh Sinha Email address: harsh.sinha@hp.com PostgreSQL version: 8.3.7 Operating system: Windows Description: Restart Failed after WAL restore Details: Hi, We have implemented Continuous Archiving using the WAL technique. We have tested it to be working. There is one condition where we are trying to restore with around 34 WAL files. After the file transfers and creation of the recovery.conf file. We start the PostgreSQL service from the Windows services.msc We also see the message "Archive Recovery Complete" in the logs under pg_log folder. But Since restore takes a long time, The service manager reports that the service has stopped, when actually after restore its running. Now when we start the service again we get error: Lock file 'postmaster.pid' already exists.... My analysis is that since windows gave up starting postgres, it put the status as STOPPED. When restore completed after a long time Postgres created postmaster.pid and started. Now when we try to start windows sees that there is a postmaster file. This creates a deadlock situation. Please let me know if you are aware of this issue or can help me solve this prob