pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: pg_ctl: Detect current standby state from pg_control
Date: Wed, 28 Sep 2016 12:38:28 -0400
Message-ID: <b4750367-afa0-03c6-3888-3b316618b8c0@2ndquadrant.com> (raw)
In-Reply-To: <CAB7nPqR9Erm1hMvE82jWLsGAVKeviUZEm-ovdaPshJvNZ3TtOw@mail.gmail.com>
References: <E1bmkJp-0007Ph-6v@gemulon.postgresql.org>
	<18364.1474818887@sss.pgh.pa.us>
	<CAB7nPqQfktJ5rd1g+hXhKaSaUQk3y=4eydNLG2sOw8chAvY2cw@mail.gmail.com>
	<27012.1474894431@sss.pgh.pa.us>
	<1b5f8f59-e3b4-b158-ef88-d409b413ec43@2ndquadrant.com>
	<f6f718c7-d9c6-8855-074c-ec91ddb16752@2ndquadrant.com>
	<CAB7nPqT5BV0Cra4hrbC_OfL_7vyBLyQ9uyu0LUO1hg3X8kg6WQ@mail.gmail.com>
	<CAB7nPqR9Erm1hMvE82jWLsGAVKeviUZEm-ovdaPshJvNZ3TtOw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 9/28/16 12:44 AM, Michael Paquier wrote:
> On Tue, Sep 27, 2016 at 9:55 AM, Michael Paquier
> <michael.paquier@gmail.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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (9+ messages)

Message-ID: <b4750367-afa0-03c6-3888-3b316618b8c0@2ndquadrant.com>
Permalink:  ../b4750367-afa0-03c6-3888-3b316618b8c0@2ndquadrant.com/
Also on:    postgresql.org/message-id/b4750367-afa0-03c6-3888-3b316618b8c0@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, michael.paquier@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: pg_ctl: Detect current standby state from pg_control
  In-Reply-To: <b4750367-afa0-03c6-3888-3b316618b8c0@2ndquadrant.com>
  References: <E1bmkJp-0007Ph-6v@gemulon.postgresql.org> <18364.1474818887@sss.pgh.pa.us> <CAB7nPqQfktJ5rd1g+hXhKaSaUQk3y=4eydNLG2sOw8chAvY2cw@mail.gmail.com> <27012.1474894431@sss.pgh.pa.us> <1b5f8f59-e3b4-b158-ef88-d409b413ec43@2ndquadrant.com> <f6f718c7-d9c6-8855-074c-ec91ddb16752@2ndquadrant.com> <CAB7nPqT5BV0Cra4hrbC_OfL_7vyBLyQ9uyu0LUO1hg3X8kg6WQ@mail.gmail.com> <CAB7nPqR9Erm1hMvE82jWLsGAVKeviUZEm-ovdaPshJvNZ3TtOw@mail.gmail.com> <b4750367-afa0-03c6-3888-3b316618b8c0@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox