From c41ff2c442e1419178d6d5b673bc2bb7e4a62aff Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 4 May 2017 23:49:55 +0900 Subject: [PATCH] Add some todos --- repmgr-action-standby.c | 1 + repmgr-client.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index 3720866f..3fe6ae9b 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -1100,6 +1100,7 @@ run_basebackup(void) */ if (runtime_options.conninfo_provided == true) { + // XXX need to override user with runtime_options.replication_user! appendPQExpBuffer(¶ms, " -d '%s'", runtime_options.dbname); } diff --git a/repmgr-client.c b/repmgr-client.c index c6b352da..51eb38b4 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -1802,6 +1802,13 @@ check_upstream_config(PGconn *conn, int server_version_num, bool exit_on_error) if (possible_replication_connections < min_replication_connections) { config_ok = false; + + /* + * XXX at this point we could check current_setting('max_wal_senders) - COUNT(*) FROM pg_stat_replication; + * if >= min_replication_connections we could infer possible authentication error. + * + * Alternatively call PQconnectStart() and poll for presence/absence of CONNECTION_AUTH_OK ? + */ log_error(_("unable to establish necessary replication connections")); log_hint(_("increase 'max_wal_senders' by at least %i"), min_replication_connections - possible_replication_connections);