Re: BUG #14356: "FATAL: the database system is starting up" error occurs to queries after PostgreSQL server start

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: xrensis(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14356: "FATAL: the database system is starting up" error occurs to queries after PostgreSQL server start
Date: 2016-10-06 11:04:03
Message-ID: 1b38b100-97ba-48ac-feba-9fac53977cc3@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 10/05/2016 05:25 PM, xrensis(at)gmail(dot)com wrote:
> After the startup of the PostgreSQL server there is a state when it accepts
> incoming connections but generates "FATAL: the database system is starting
> up" as results for run queries.

That's not a bug, that's the way it's designed to work.

> - Is there a known interface to check if the database is up and fully
> functional and ready for queries?

The simplest way is to run a query with e.g. "psql -c 'select 1'", and
see if it works.

Note that you can also use "pg_ctl start -w" to have pg_ctl wait for the
database to fully start up, before it returns.

> - Is it possible theoretically that the result of a query is incorrect
> and does not match the actual data in the database?

No. (Assuming there are no bugs, hardware failure, etc, of course).

- Heikki

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2016-10-06 11:07:27 Re: SQL Bug
Previous Message Bujji Babu 2016-10-06 10:59:58 Re: [BUGS] SQL Bug