From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_ctl promote wait |
Date: | 2016-02-19 15:06:09 |
Message-ID: | CAHGQGwFoUz3hmRPn2wBCAvKwkdD3DQyeFkcg_HQBhk_bgzr16Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 18, 2016 at 5:45 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 18 February 2016 at 08:33, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>
>> Hi,
>>
>> On 2016-02-17 21:47:50 -0500, Peter Eisentraut wrote:
>> > It would be nice if pg_ctl promote supported the -w (wait) option.
+1
>> > How could pg_ctl determine when the promotion has finished?
>>
>> How about looking into pg_control? ControlFileData->state ought to have
>> the correct information.
>
>
> +1
One concern is that there can be a "time" after the pg_control's state
is changed to DB_IN_PRODUCTION and before the server is able to
start accepting normal (not read-only) connections. So if users try to
start write transaction just after pg_ctl promote -w ends, they might
get an error because the server is still in recovery, i.e., the startup
process is running.
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2016-02-19 15:14:47 | Re: PostgreSQL Audit Extension |
Previous Message | Fabien COELHO | 2016-02-19 15:04:57 | Re: checkpointer continuous flushing - V16 |