Re: pg_ctl promote wait - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: pg_ctl promote wait
Date
Msg-id CANP8+jJXFKTGNXv34XOY07iy5OCAZppR45PLeosbqtZB=uLHZQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_ctl promote wait  (Andres Freund <andres@anarazel.de>)
Responses Re: pg_ctl promote wait
List pgsql-hackers
On 18 February 2016 at 08:33, Andres Freund <andres@anarazel.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.
>
> 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
 
--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: a raft of parallelism-related bug fixes
Next
From: Masahiko Sawada
Date:
Subject: Re: Freeze avoidance of very large table.