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