mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
standby switchover: warn if no superuser connection available
This commit is contained in:
@@ -3561,6 +3561,16 @@ do_standby_switchover(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Warn if no superuser connection is available.
|
||||||
|
*/
|
||||||
|
if (superuser_conn == NULL && is_superuser_connection(local_conn, NULL) == false)
|
||||||
|
{
|
||||||
|
log_warning(_("no superuser connection available"));
|
||||||
|
log_detail(_("it is recommended to perform switchover operations with a database superuser"));
|
||||||
|
log_hint(_("provide the name of a superuser with -S/--superuser"));
|
||||||
|
}
|
||||||
|
|
||||||
/* Check that this is a standby */
|
/* Check that this is a standby */
|
||||||
recovery_type = get_recovery_type(local_conn);
|
recovery_type = get_recovery_type(local_conn);
|
||||||
if (recovery_type != RECTYPE_STANDBY)
|
if (recovery_type != RECTYPE_STANDBY)
|
||||||
|
|||||||
Reference in New Issue
Block a user