Add configuration file setting "use_primary_conninfo_password"

If, for whatever reason, the upstream server password needs to be set
in "primary_conninfo", enable it to be extracted from $PGPASSWORD.
This commit is contained in:
Ian Barwick
2017-08-31 14:57:07 +09:00
parent 677cd9073a
commit 0e0b221507
8 changed files with 45 additions and 28 deletions

View File

@@ -226,7 +226,7 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
memset(options->log_file, 0, sizeof(options->log_file));
options->log_status_interval = DEFAULT_LOG_STATUS_INTERVAL;
/* standby clone settings
/* standby action settings
* ----------------------- */
options->use_replication_slots = false;
memset(options->rsync_options, 0, sizeof(options->rsync_options));
@@ -238,6 +238,7 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
options->tablespace_mapping.head = NULL;
options->tablespace_mapping.tail = NULL;
memset(options->recovery_min_apply_delay, 0, sizeof(options->recovery_min_apply_delay));
options->use_primary_conninfo_password = false;
/* repmgrd settings
* ---------------- */
@@ -395,6 +396,8 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
strncpy(options->restore_command, value, MAXLEN);
else if (strcmp(name, "recovery_min_apply_delay") == 0)
parse_time_unit_parameter(name, value, options->recovery_min_apply_delay, error_list);
else if (strcmp(name, "use_primary_conninfo_password") == 0)
options->use_primary_conninfo_password = parse_bool(value, name, error_list);
/* node check settings */
else if (strcmp(name, "archive_ready_warning") == 0)