pgsql: pg_ctl: Detect current standby state from pg_control

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pg_ctl: Detect current standby state from pg_control
Date: 2016-09-21 16:24:21
Message-ID: E1bmkJp-0007Ph-6v@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

pg_ctl: Detect current standby state from pg_control

pg_ctl used to determine whether a server was in standby mode by looking
for a recovery.conf file. With this change, it instead looks into
pg_control, which is potentially more accurate. There are also
occasional discussions about removing recovery.conf, so this removes one
dependency.

Reviewed-by: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c1dc51d4844e2a37412b034c07c1c5a439ba0b9d

Modified Files
--------------
src/backend/utils/misc/pg_controldata.c | 12 +++++++++
src/bin/pg_controldata/pg_controldata.c | 4 +++
src/bin/pg_ctl/pg_ctl.c | 47 ++++++++++++++++++++++++++-------
src/common/controldata_utils.c | 15 +++++------
src/include/common/controldata_utils.h | 2 +-
5 files changed, 62 insertions(+), 18 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2016-09-22 12:58:44 pgsql: Add tests for various connection string issues
Previous Message Peter Eisentraut 2016-09-21 15:28:48 pgsql: Fix typo

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-09-21 16:25:11 Re: pg_ctl promote wait
Previous Message David Fetter 2016-09-21 16:22:59 Re: New SQL counter statistics view (pg_stat_sql)