Re: BUG #10736: Database does somtimes not startup again after restart

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: marcel(dot)hanke(at)1und1(dot)de
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #10736: Database does somtimes not startup again after restart
Date: 2014-06-23 14:26:56
Message-ID: 35774724a62df8d61580b53e4328de86.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 23 Červen 2014, 10:33, marcel(dot)hanke(at)1und1(dot)de wrote:
> The following bug has been logged on the website:
>
> Bug reference: 10736
> Logged by: Marcel Hanke
> Email address: marcel(dot)hanke(at)1und1(dot)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=<HIDDEN>: 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=<HIDDEN>:
> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2014-06-23 14:31:50 Re: BUG #10734: PostgreSQL 9.3.4 shutdown forever in zfsonlinux 0.6.3-1 filesystem
Previous Message Tomas Vondra 2014-06-23 14:22:13 Re: BUG #10726: database gets to an older backup out of nowhere!!!