mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
Add configuration file "passfile"
This will enable a custom .pgpass to be included in "primary_conninfo" (provided it's supported by the libpq version on the standby).
This commit is contained in:
@@ -4970,6 +4970,17 @@ write_primary_conninfo(char *line, t_conninfo_param_list *param_list)
|
||||
}
|
||||
}
|
||||
|
||||
/* passfile provided as configuration option */
|
||||
if (config_file_options.passfile[0] != '\n')
|
||||
{
|
||||
/* check if the libpq we're using supports "passfile=" */
|
||||
if (has_passfile() == true)
|
||||
{
|
||||
appendPQExpBuffer(&conninfo_buf, " passfile=");
|
||||
appendConnStrVal(&conninfo_buf, config_file_options.passfile);
|
||||
}
|
||||
}
|
||||
|
||||
escaped = escape_recovery_conf_value(conninfo_buf.data);
|
||||
maxlen_snprintf(line, "primary_conninfo = '%s'\n", escaped);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user