Re: pg_ctl promote wait

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ctl promote wait
Date: 2016-08-10 18:24:35
Message-ID: a64e7559-e4d5-2e3e-3d48-0eb2af6a9762@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v2-0001-Make-command_like-output-more-compact.patch text/x-patch 1.0 KB
v2-0002-pg_ctl-Add-tests-for-promote-action.patch text/x-patch 2.6 KB
v2-0003-pg_ctl-Detect-current-standby-state-from-pg_contr.patch text/x-patch 8.3 KB
v2-0004-Delay-updating-control-file-to-in-production.patch text/x-patch 2.8 KB
v2-0005-pg_ctl-Add-wait-option-to-promote-action.patch text/x-patch 5.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-08-10 18:34:58 Re: multivariate statistics (v19)
Previous Message Robert Haas 2016-08-10 18:22:52 Re: Declarative partitioning - another take