mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
repmgr: use provided --replication-user in pg_basebackup mode
This commit is contained in:
9
repmgr.c
9
repmgr.c
@@ -6990,7 +6990,11 @@ run_basebackup(const char *data_dir, int server_version)
|
|||||||
appendPQExpBuffer(¶ms, " -p %s", runtime_options.masterport);
|
appendPQExpBuffer(¶ms, " -p %s", runtime_options.masterport);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(runtime_options.username))
|
if (strlen(runtime_options.replication_user))
|
||||||
|
{
|
||||||
|
appendPQExpBuffer(¶ms, " -U %s", runtime_options.replication_user);
|
||||||
|
}
|
||||||
|
else if (strlen(runtime_options.username))
|
||||||
{
|
{
|
||||||
appendPQExpBuffer(¶ms, " -U %s", runtime_options.username);
|
appendPQExpBuffer(¶ms, " -U %s", runtime_options.username);
|
||||||
}
|
}
|
||||||
@@ -8047,6 +8051,9 @@ check_upstream_config(PGconn *conn, int server_version_num, bool exit_on_error)
|
|||||||
|
|
||||||
param_set(&repl_conninfo, "replication", "1");
|
param_set(&repl_conninfo, "replication", "1");
|
||||||
|
|
||||||
|
if (*runtime_options.replication_user)
|
||||||
|
param_set(&repl_conninfo, "user", runtime_options.replication_user);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* work out how many replication connections are required (1 or 2)
|
* work out how many replication connections are required (1 or 2)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user