Re: pg_ctl promote wait - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_ctl promote wait
Date
Msg-id a64e7559-e4d5-2e3e-3d48-0eb2af6a9762@2ndquadrant.com
Whole thread Raw
In response to Re: pg_ctl promote wait  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: pg_ctl promote wait  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
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.

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.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Declarative partitioning - another take
Next
From: Tomas Vondra
Date:
Subject: Re: multivariate statistics (v19)