On Thu, Aug 11, 2016 at 3:24 AM, Peter Eisentraut
<peter.eisentr...@2ndquadrant.com> wrote:
> On 8/7/16 9:44 PM, Michael Paquier wrote:
>>>> 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.
> New patches, incorporating your suggestions.

Thanks for the new set!

> I moved some of the error handling out of get_controlfile() and back
> into the callers, because it was getting too weird that that function
> knew so much about the callers' intentions.  That way we don't actually
> have to change the signature.

I have looked at them and the changes are looking fine for me. So I
have switched the patch as ready for committer, aka you.

Just a nit:
+       if (wait_seconds > 0)
+       {
+           sleep(1);
+           wait_seconds--;
+           continue;
+       }
This may be better this pg_usleep() instead of sleep().

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to