From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_ctl promote wait |
Date: | 2016-08-08 01:44:57 |
Message-ID: | CAB7nPqSmXXO05J_A41ZvbY=H+Yfc6QfFpCc5ZWfk1TbcGdgXTg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Aug 6, 2016 at 10:43 AM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> On 8/5/16 12:14 AM, Michael Paquier wrote:
>> In do_stop, this patches makes the wait happen for a maximum of
>> wait_seconds * 2, once when getting the control file information, and
>> once when waiting for the server to shut down.
>
> That's not how I read it. get_controlfile() will decrease the
> wait_seconds argument by how much wait time it has used. The wait for
> shutdown will then only use as much seconds as are left.
Ah, right. The reference to wait_seconds gets decremented.
>> This is not a good
>> idea, and the idea of putting a wait argument in get_controlfile does
>> not seem a good interface to me. I'd rather see get_controlfile be
>> extended with a flag saying no_error_on_failure and keep the wait
>> logic within pg_ctl.
>
> I guess we could write a wrapper function in pg_ctl that encapsulated
> the wait logic.
That's what I would do.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-08-08 01:47:09 | Re: Slowness of extended protocol |
Previous Message | Tsunakawa, Takayuki | 2016-08-08 01:17:05 | Re: [RFC] Change the default of update_process_title to off |