mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Fix logging related to "connection_check_type"
Also log the selected type at repmgrd startup.
This commit is contained in:
22
configfile.c
22
configfile.c
@@ -645,7 +645,7 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
||||
else
|
||||
{
|
||||
item_list_append(error_list,
|
||||
_("value for \"connection_check_type\" must be \"ping\" or \"connection\"\n"));
|
||||
_("value for \"connection_check_type\" must be \"ping\", \"connection\" or \"query\"\n"));
|
||||
}
|
||||
}
|
||||
else if (strcmp(name, "primary_visibility_consensus") == 0)
|
||||
@@ -1398,7 +1398,7 @@ reload_config(t_configuration_options *orig_options, t_server_type server_type)
|
||||
{
|
||||
orig_options->connection_check_type = new_options.connection_check_type;
|
||||
log_info(_("\"connection_check_type\" is now \"%s\""),
|
||||
new_options.connection_check_type == CHECK_PING ? "ping" : "connection");
|
||||
print_connection_check_type(new_options.connection_check_type));
|
||||
config_changed = true;
|
||||
}
|
||||
|
||||
@@ -2017,3 +2017,21 @@ parse_pg_basebackup_options(const char *pg_basebackup_options, t_basebackup_opti
|
||||
|
||||
return backup_options_ok;
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
print_connection_check_type(ConnectionCheckType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case CHECK_PING:
|
||||
return "ping";
|
||||
case CHECK_QUERY:
|
||||
return "query";
|
||||
case CHECK_CONNECTION:
|
||||
return "connection";
|
||||
}
|
||||
|
||||
/* should never reach here */
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
@@ -329,5 +329,6 @@ void free_parsed_argv(char ***argv_array);
|
||||
/* called by repmgr-client and repmgrd */
|
||||
void exit_with_cli_errors(ItemList *error_list, const char *repmgr_command);
|
||||
void print_item_list(ItemList *item_list);
|
||||
const char *print_connection_check_type(ConnectionCheckType type);
|
||||
|
||||
#endif /* _REPMGR_CONFIGFILE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user