mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
"standby clone": fix a couple of regressions
This commit is contained in:
@@ -187,6 +187,9 @@ do_standby_clone(void)
|
|||||||
|
|
||||||
copy_conninfo_params(&recovery_conninfo, &source_conninfo);
|
copy_conninfo_params(&recovery_conninfo, &source_conninfo);
|
||||||
|
|
||||||
|
/* Set the default application name to this node's name */
|
||||||
|
param_set(&recovery_conninfo, "application_name", config_file_options.node_name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If application_name is set in repmgr.conf's conninfo parameter, use
|
* If application_name is set in repmgr.conf's conninfo parameter, use
|
||||||
* this value (if the source host was provided as a conninfo string, any
|
* this value (if the source host was provided as a conninfo string, any
|
||||||
@@ -211,10 +214,12 @@ do_standby_clone(void)
|
|||||||
* --upstream-conninfo supplied, which we interpret to imply
|
* --upstream-conninfo supplied, which we interpret to imply
|
||||||
* --no-upstream-connection as well - the use case for this option is when
|
* --no-upstream-connection as well - the use case for this option is when
|
||||||
* the upstream is not available, so no point in checking for it.
|
* the upstream is not available, so no point in checking for it.
|
||||||
|
*
|
||||||
|
* XXX not sure of the logic here (and yes I did think this up)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (*runtime_options.upstream_conninfo)
|
if (*runtime_options.upstream_conninfo)
|
||||||
runtime_options.no_upstream_connection = true;
|
runtime_options.no_upstream_connection = false;
|
||||||
|
|
||||||
/* By default attempt to connect to the source server */
|
/* By default attempt to connect to the source server */
|
||||||
if (runtime_options.no_upstream_connection == false)
|
if (runtime_options.no_upstream_connection == false)
|
||||||
|
|||||||
@@ -1441,6 +1441,12 @@ get_superuser_connection(PGconn **conn, PGconn **superuser_conn, PGconn **privil
|
|||||||
t_connection_user userinfo;
|
t_connection_user userinfo;
|
||||||
bool is_superuser;
|
bool is_superuser;
|
||||||
|
|
||||||
|
/* this should never happen */
|
||||||
|
if (PQstatus(conn) != CONNECTION_OK)
|
||||||
|
{
|
||||||
|
log_error(_("no database connection available"));
|
||||||
|
exit(ERR_INTERNAL);
|
||||||
|
}
|
||||||
is_superuser = is_superuser_connection(*conn, &userinfo);
|
is_superuser = is_superuser_connection(*conn, &userinfo);
|
||||||
|
|
||||||
if (is_superuser == true)
|
if (is_superuser == true)
|
||||||
|
|||||||
Reference in New Issue
Block a user