From 8d84732026c90254664d11d197ae92dfad556607 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 21 Jun 2017 14:53:02 +0900 Subject: [PATCH] repmgr standby follow: suppress master database connection error messages --- repmgr-action-standby.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index 37992986..fc88af87 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -1083,7 +1083,7 @@ do_standby_promote(void) } - /* we also need to check if there isn't any master already */ + /* check that there's no existing master */ current_master_conn = get_master_connection_quiet(conn, &existing_master_id, NULL); if (PQstatus(current_master_conn) == CONNECTION_OK) @@ -1291,9 +1291,9 @@ do_standby_follow(void) for (timer = 0; timer < config_file_options.master_response_timeout; timer++) { - master_conn = get_master_connection(local_conn, - &master_id, - NULL); + master_conn = get_master_connection_quiet(local_conn, + &master_id, + NULL); if (PQstatus(master_conn) == CONNECTION_OK || runtime_options.wait == false) { @@ -1434,10 +1434,6 @@ do_standby_follow(void) original_upstream_node_id = master_id; } } - { - char *list = param_list_to_string(&recovery_conninfo); - printf("recovery: %s\n", list); - } log_info(_("changing standby's master to node %i"), master_id);