mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
standby promote: fall back to "pg_ctl promote" if necessary
From PostgreSQL 12, the SQL-level function "pg_promote()" can be used to promote a PostgreSQL instance, however usage is restricted to superusers and users to whom explicit execution permission for this function has been granted. Therefore, if execution permission is not available, fall back to "pg_ctl promote".
This commit is contained in:
@@ -441,6 +441,7 @@ uint64 system_identifier(PGconn *conn);
|
||||
TimeLineHistoryEntry *get_timeline_history(PGconn *repl_conn, TimeLineID tli);
|
||||
|
||||
/* user/role information functions */
|
||||
bool can_execute_pg_promote(PGconn *conn);
|
||||
bool connection_has_pg_settings(PGconn *conn);
|
||||
bool is_replication_role(PGconn *conn, char *rolname);
|
||||
bool is_superuser_connection(PGconn *conn, t_connection_user *userinfo);
|
||||
|
||||
Reference in New Issue
Block a user