Consolidate role availability checking code

This commit is contained in:
Ian Barwick
2020-09-01 14:37:33 +09:00
parent 8d57d7e001
commit 1f7ac843fd
4 changed files with 2 additions and 48 deletions

View File

@@ -5784,7 +5784,7 @@ check_source_server()
* This will check if the user is superuser or (from Pg10) is a member
* of "pg_read_all_settings"/"pg_monitor"
*/
if (connection_has_pg_settings(source_conn))
if (connection_has_pg_monitor_role(source_conn, "pg_read_all_settings") == true)
{
SettingsUser = REPMGR_USER;
}