Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait
Date
Msg-id CAB7nPqRLiLk-WYX+ApNq6cZs9fmcZ5VwRgaSj9SLKkVQAiK-jw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Wed, Jan 18, 2017 at 10:35 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Wed, Jan 18, 2017 at 7:31 AM, Stephen Frost <sfrost@snowman.net> wrote:
>> Perhaps we need a way for pg_ctl to realize a cold-standby case and
>> throw an error or warning if --wait is specified then, but that hardly
>> seems like the common use-case.  It also wouldn't make any sense to have
>> anything in the init system which depended on PG being up in such a case
>> because, well, PG isn't ever going to be 'up'.
>
> Yeah, it seems to me that we are likely looking for a wait mode saying
> to exit pg_ctl once Postgres is happily rejecting connections, because
> that means that it is up and that it is sorting out something first
> before accepting them. This would basically filter the states in the
> control file that we find as acceptable if the connection test
> continues complaining about PQPING_REJECT.

Another option would be as well to log the state of the control file
to the user to let him know what currently happens, and document that
increasing the wait timeout is recommended if the recovery time since
the last redo point takes longer.
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait
Next
From: Nikita Glukhov
Date:
Subject: [HACKERS] [PATCH] kNN for btree