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

2016-09-28 Thread Peter Eisentraut
On 9/28/16 12:44 AM, Michael Paquier wrote: > On Tue, Sep 27, 2016 at 9:55 AM, Michael Paquier > 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

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

2016-09-27 Thread Michael Paquier
On Tue, Sep 27, 2016 at 9:55 AM, Michael Paquier 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

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

2016-09-26 Thread Michael Paquier
On Tue, Sep 27, 2016 at 9:45 AM, Peter Eisentraut wrote: > On 9/26/16 7:56 PM, Peter Eisentraut wrote: >> On 9/26/16 8:53 AM, Tom Lane wrote: >>> I think that it's 100% pointless for get_control_dbstate >>> to be worried about transient CRC failures. If writes