mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
Compare commits
15 Commits
dev/codeow
...
generate-5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
890cbd9fca | ||
|
|
440ba5fbb4 | ||
|
|
20f39e2fbe | ||
|
|
afdeb5d7b2 | ||
|
|
7d45ab04b3 | ||
|
|
7af74c4fda | ||
|
|
1010aeb3dd | ||
|
|
c58c95c9f1 | ||
|
|
3887637f1e | ||
|
|
7a84e34630 | ||
|
|
9ab4acea78 | ||
|
|
ef962436f7 | ||
|
|
9a68206b4a | ||
|
|
31af938354 | ||
|
|
061025b62f |
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@@ -1,7 +0,0 @@
|
|||||||
# Each line is a file pattern followed by one or more owners.
|
|
||||||
|
|
||||||
# These owners will be the default owners for everything in
|
|
||||||
# the repo. Unless a later match takes precedence,
|
|
||||||
# @global-owner1 and @global-owner2 will be requested for
|
|
||||||
# review when someone opens a pull request.
|
|
||||||
* @EnterpriseDB/repmgr-dev
|
|
||||||
2
HISTORY
2
HISTORY
@@ -1,4 +1,4 @@
|
|||||||
5.4.1 2023-??-??
|
5.4.1 2023-07-04
|
||||||
repmgrd: ensure witness node metadata is updated (Ian)
|
repmgrd: ensure witness node metadata is updated (Ian)
|
||||||
|
|
||||||
5.4.0 2023-03-16
|
5.4.0 2023-03-16
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
AC_INIT([repmgr], [5.4.0], [repmgr@googlegroups.com], [repmgr], [https://repmgr.org/])
|
AC_INIT([repmgr],[5.4.1],[repmgr@googlegroups.com],[repmgr],[https://www.repmgr.org/])
|
||||||
|
|
||||||
AC_COPYRIGHT([Copyright (c) 2010-2021, EnterpriseDB Corporation])
|
AC_COPYRIGHT([Copyright (c) 2010-2021, EnterpriseDB Corporation])
|
||||||
|
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
AC_ARG_VAR([PG_CONFIG], [Location to find pg_config for target PostgreSQL (default PATH)])
|
AC_ARG_VAR([PG_CONFIG], [Location to find pg_config for target PostgreSQL (default PATH)])
|
||||||
|
|
||||||
|
|||||||
48
dbutils.c
48
dbutils.c
@@ -1913,47 +1913,15 @@ can_disable_walsender(PGconn *conn)
|
|||||||
if (is_superuser_connection(conn, NULL) == true)
|
if (is_superuser_connection(conn, NULL) == true)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
PQExpBufferData query;
|
/*
|
||||||
PGresult *res;
|
* As of PostgreSQL 14, it is not possible for a non-superuser
|
||||||
bool has_alter_system_priv = false;
|
* to execute ALTER SYSTEM, so further checks are superfluous.
|
||||||
|
* This will need modifying for PostgreSQL 15.
|
||||||
|
*/
|
||||||
|
log_warning(_("\"standby_disconnect_on_failover\" specified, but repmgr user is not a superuser"));
|
||||||
|
log_detail(_("superuser permission required to disable standbys on failover"));
|
||||||
|
|
||||||
/* GRANT ALTER SYSTEM available from PostgreSQL 15 */
|
return false;
|
||||||
if (PQserverVersion(conn) >= 150000)
|
|
||||||
{
|
|
||||||
initPQExpBuffer(&query);
|
|
||||||
appendPQExpBufferStr(&query,
|
|
||||||
" SELECT pg_catalog.has_parameter_privilege('wal_retrieve_retry_interval', 'ALTER SYSTEM') ");
|
|
||||||
|
|
||||||
res = PQexec(conn, query.data);
|
|
||||||
|
|
||||||
if (PQresultStatus(res) != PGRES_TUPLES_OK)
|
|
||||||
{
|
|
||||||
log_db_error(conn, query.data,
|
|
||||||
_("can_disable_walsender(): unable to query user parameter privileges"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
has_alter_system_priv = atobool(PQgetvalue(res, 0, 0));
|
|
||||||
}
|
|
||||||
termPQExpBuffer(&query);
|
|
||||||
PQclear(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has_alter_system_priv == false)
|
|
||||||
{
|
|
||||||
log_warning(_("\"standby_disconnect_on_failover\" specified, but repmgr user is not authorized to perform ALTER SYSTEM wal_retrieve_retry_interval"));
|
|
||||||
|
|
||||||
if (PQserverVersion(conn) >= 150000)
|
|
||||||
{
|
|
||||||
log_detail(_("superuser or ALTER SYSTEM wal_retrieve_retry_interval permission required to disable standbys on failover"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
log_detail(_("superuser permission required to disable standbys on failover"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return has_alter_system_priv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -159,10 +159,8 @@
|
|||||||
<simpara>
|
<simpara>
|
||||||
The <command>ALTER SYSTEM</command> is executed by &repmgrd; if
|
The <command>ALTER SYSTEM</command> is executed by &repmgrd; if
|
||||||
<varname>standby_disconnect_on_failover</varname> is set to <literal>true</literal> in
|
<varname>standby_disconnect_on_failover</varname> is set to <literal>true</literal> in
|
||||||
<filename>repmgr.conf</filename>. Until PostgreSQL 14 <command>ALTER SYSTEM</command> can only be executed by
|
<filename>repmgr.conf</filename>. <command>ALTER SYSTEM</command> can only be executed by
|
||||||
a superuser; if the &repmgr; user is not a superuser, this functionality will not be available.
|
a superuser; if the &repmgr; user is not a superuser, this functionality will not be available.
|
||||||
From PostgreSQL 15 a specific ALTER SYSTEM privilege can be granted with e.g.
|
|
||||||
<command>GRANT ALTER SYSTEM ON PARAMETER wal_retrieve_retry_interval TO repmgr</command>.
|
|
||||||
</simpara>
|
</simpara>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|||||||
@@ -279,9 +279,7 @@
|
|||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
<option>standby_disconnect_on_failover</option> is available with PostgreSQL 9.5 and later.
|
<option>standby_disconnect_on_failover</option> is available with PostgreSQL 9.5 and later.
|
||||||
Until PostgreSQL 14 this requires that the <literal>repmgr</literal> database user is a superuser.
|
Additionally this requires that the <literal>repmgr</literal> database user is a superuser.
|
||||||
From PostgreSQL 15 a specific ALTER SYSTEM privilege can be granted to the <literal>repmgr</literal> database
|
|
||||||
user with e.g. <command>GRANT ALTER SYSTEM ON PARAMETER wal_retrieve_retry_interval TO repmgr</command>.
|
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
@@ -340,9 +340,7 @@ ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh"
|
|||||||
#repmgrd_exit_on_inactive_node=false # If "true", and the node record is marked as "inactive", abort repmgrd startup
|
#repmgrd_exit_on_inactive_node=false # If "true", and the node record is marked as "inactive", abort repmgrd startup
|
||||||
#standby_disconnect_on_failover=false # If "true", in a failover situation wait for all standbys to
|
#standby_disconnect_on_failover=false # If "true", in a failover situation wait for all standbys to
|
||||||
# disconnect their WAL receivers before electing a new primary
|
# disconnect their WAL receivers before electing a new primary
|
||||||
# Can be true in PostgreSQL 9.5 and later only. Until PostgreSQL 14 repmgr user must be a superuser to use this.
|
# (PostgreSQL 9.5 and later only; repmgr user must be a superuser for this)
|
||||||
# From PostgreSQL 15 repmgr must be a superuser or have 'ALTER SYSTEM wal_retrieve_retry_interval' privilege.
|
|
||||||
# (see: https://repmgr.org/docs/current/repmgrd-standby-disconnection-on-failover.html )
|
|
||||||
#sibling_nodes_disconnect_timeout=30 # If "standby_disconnect_on_failover" is true, the maximum length of time
|
#sibling_nodes_disconnect_timeout=30 # If "standby_disconnect_on_failover" is true, the maximum length of time
|
||||||
# (in seconds) to wait for other standbys to confirm they have disconnected their
|
# (in seconds) to wait for other standbys to confirm they have disconnected their
|
||||||
# WAL receivers
|
# WAL receivers
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#define REPMGR_VERSION_DATE ""
|
#define REPMGR_VERSION_DATE ""
|
||||||
#define REPMGR_VERSION "5.4dev"
|
#define REPMGR_VERSION "5.4.1"
|
||||||
#define REPMGR_VERSION_NUM 50400
|
#define REPMGR_VERSION_NUM 50401
|
||||||
#define REPMGR_EXTENSION_VERSION "5.4"
|
#define REPMGR_EXTENSION_VERSION "5.4"
|
||||||
#define REPMGR_EXTENSION_NUM 50400
|
#define REPMGR_EXTENSION_NUM 50400
|
||||||
#define REPMGR_RELEASE_DATE "2022-XX-XX"
|
#define REPMGR_RELEASE_DATE "2023-07-04"
|
||||||
#define PG_ACTUAL_VERSION_NUM
|
#define PG_ACTUAL_VERSION_NUM
|
||||||
|
|||||||
Reference in New Issue
Block a user