Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wz5D6-0001ET-5X for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Jun 2014 14:27:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wz5D5-0001Vb-MP for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Jun 2014 14:27:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Wz5D4-0001VV-Um for pgsql-bugs@postgresql.org; Mon, 23 Jun 2014 14:27:03 +0000 Received: from smtp-out2.gransy.com ([77.78.126.49]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wz5D1-0002CJ-Sc for pgsql-bugs@postgresql.org; Mon, 23 Jun 2014 14:27:01 +0000 Received: from smtp-out.gransy.com (localhost [127.0.0.1]) by smtp-out2.gransy.com (Postfix) with ESMTP id 37D693F0191 for ; Mon, 23 Jun 2014 16:27:01 +0200 (CEST) Received: from smtp.gransy.com (smtp.simplia.cz [77.78.126.20]) by smtp-out2.gransy.com (Postfix) with ESMTP id A81ED3F018C; Mon, 23 Jun 2014 16:27:00 +0200 (CEST) Received: from sq.gransy.com (elizabeth.gransy.com [89.187.132.199]) (Authenticated sender: tv@fuzzy.cz) by smtp.gransy.com (Postfix) with ESMTPA id 38A9319A0692; Mon, 23 Jun 2014 16:26:50 +0200 (CEST) Received: from 212.47.19.46 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Mon, 23 Jun 2014 16:26:56 +0200 Message-ID: <35774724a62df8d61580b53e4328de86.squirrel@sq.gransy.com> In-Reply-To: <20140623083331.2622.38092@wrigleys.postgresql.org> References: <20140623083331.2622.38092@wrigleys.postgresql.org> Date: Mon, 23 Jun 2014 16:26:56 +0200 Subject: Re: BUG #10736: Database does somtimes not startup again after restart From: "Tomas Vondra" To: marcel.hanke@1und1.de Cc: pgsql-bugs@postgresql.org User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Pg-Spam-Score: -0.2 (/) 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 On 23 Červen 2014, 10:33, marcel.hanke@1und1.de wrote: > The following bug has been logged on the website: > > Bug reference: 10736 > Logged by: Marcel Hanke > Email address: marcel.hanke@1und1.de > PostgreSQL version: 9.1.13 > Operating system: Debian > Description: > > After an update of any related Packet (or the postgres it self), witch > requires an restart of the Database, the db sometimes doesn't start up > again. > The Postgres is used to provide data to an Powerdns Server and runs in an > Master-Slave replication. > > Errormassages: > postgres_main[3195]: [1-1] 2014-06-20 12:59:07 CEST FATAL: the database > system is starting up > postgres_main[3196]: [1-1] 2014-06-20 12:59:07 CEST FATAL: the database > system is starting up > pdns[3061]: gpgsql Connection failed: Unable to connect to database, > connect > string: dbname=pdns user=postgres host=127.0.0.1 port=5432 > password=: FATAL: the database system is starting up > pdns[3061]: Caught an exception instantiating a backend: Unable to launch > gpgsql connection: Unable to connect to database, connect string: > dbname=pdns user=postgres host=127.0.0.1 port=5432 password=: > FATAL: > the database system is starting up > pdns[3061]: Cleaning up > > The Error doesn't accrue every time. It's atm not possible to reproduce > the > error on an test system, so I can't provide an debug log. Well, I don't know how you start the database, but for example pg_ctl does not guarantee the startup to be complete unless "-w" option is used. It simply initiates the startup and returns. On a busy system this may easily take several seconds (and then you'd see the errors you posted when attempting to access the DB before the startup completed). I.e. this is expected feature, not a bug. If you need to prevent this, use the "-w" option (not sure which OS / distribution you use, so not sure which init script pg_ctl is called from). regards Tomas -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs