mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Ensure get_pg_settings() returns false if parameter not found
Previously, if e.g. a non-superuser connection is used to get a value like `data_directory`, which is available to superusers only, it would return true.
This commit is contained in:
@@ -504,7 +504,7 @@ get_pg_setting(PGconn *conn, const char *setting, char *output)
|
||||
char sqlquery[QUERY_STR_LEN];
|
||||
PGresult *res;
|
||||
int i;
|
||||
bool success = true;
|
||||
bool success = false;
|
||||
|
||||
sqlquery_snprintf(sqlquery,
|
||||
"SELECT name, setting "
|
||||
|
||||
2
repmgr.c
2
repmgr.c
@@ -3697,7 +3697,7 @@ do_standby_switchover(void)
|
||||
/* the remote server is the primary to be demoted */
|
||||
char remote_conninfo[MAXCONNINFO] = "";
|
||||
char remote_host[MAXLEN];
|
||||
char remote_data_directory[MAXLEN];
|
||||
char remote_data_directory[MAXPGPATH] = "";
|
||||
int remote_node_id;
|
||||
char remote_node_replication_state[MAXLEN] = "";
|
||||
char remote_archive_config_dir[MAXLEN];
|
||||
|
||||
Reference in New Issue
Block a user