diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index fc88af87..1034b86d 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -1435,7 +1435,8 @@ do_standby_follow(void) } } - log_info(_("changing standby's master to node %i"), master_id); + log_info(_("changing node %i's master to node %i"), + config_file_options.node_id, master_id); if (!create_recovery_file(data_dir, &recovery_conninfo)) { diff --git a/repmgr-client.c b/repmgr-client.c index 5758ca8a..960c15b5 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -968,6 +968,22 @@ check_cli_parameters(const int action) } } break; + case STANDBY_FOLLOW: + { + /* + * if `repmgr standby follow` executed with host params, ensure data + * directory was provided + */ + if (runtime_options.host_param_provided == true) + { + if (runtime_options.data_dir[0] == '\0') + { + item_list_append_format(&cli_errors, + _("-D/--data-dir required when providing connection parameters for \"standby follow\"")); + } + } + + } case CLUSTER_EVENT: /* no required parameters */ break;