From 167b4efbb331b1a276ecaeb5b373df4e49aad962 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 22 Dec 2015 10:47:44 +0900 Subject: [PATCH] Add note about why 'hot_standby=on' is currently required --- repmgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repmgr.c b/repmgr.c index 89f7331c..669fa756 100644 --- a/repmgr.c +++ b/repmgr.c @@ -4262,7 +4262,6 @@ check_upstream_config(PGconn *conn, int server_version_num, bool exit_on_error) * of what's in 'archive_command', so until 'archive_mode' is on we can't * properly check it. */ - if (guc_set(conn, "archive_mode", "=", "on")) { i = guc_set(conn, "archive_command", "!=", ""); @@ -4283,6 +4282,11 @@ check_upstream_config(PGconn *conn, int server_version_num, bool exit_on_error) } + /* + * Check that 'hot_standby' is on. This isn't strictly necessary + * for the primary server, however the assumption is that configuration + * should be consistent for all servers in a cluster. + */ i = guc_set(conn, "hot_standby", "=", "on"); if (i == 0 || i == -1) {