Re: [COMMITTERS] pgsql: pg_ctl: Detect current standby state from pg_control

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: pg_ctl: Detect current standby state from pg_control
Date: 2016-09-28 16:38:28
Message-ID: b4750367-afa0-03c6-3888-3b316618b8c0@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 9/28/16 12:44 AM, Michael Paquier wrote:
> On Tue, Sep 27, 2016 at 9:55 AM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> > Seems overcomplicated to me. How about returning the control file all
>> > the time and let the caller pfree the result? You could then use
>> > crc_ok in pg_ctl.c's get_control_dbstate() to do the decision-making.
> In short I would just go with the attached and call it a day.

Pushed that way. Thanks!

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-09-28 16:46:21 pgsql: worker_spi: Call pgstat_report_stat.
Previous Message Peter Eisentraut 2016-09-28 16:37:59 pgsql: Fix CRC check handling in get_controlfile

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-09-28 16:46:40 Re: Issue with bgworker, SPI and pgstat_report_stat
Previous Message Alvaro Herrera 2016-09-28 16:37:50 Re: compiler warning read_objtype_from_string()