mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Compare commits
6 Commits
dev/codeow
...
v5.4.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
||||
@@ -8,7 +8,7 @@ replication, and perform administrative tasks such as failover or switchover
|
||||
operations.
|
||||
|
||||
The most recent `repmgr` version (5.3.2) supports all PostgreSQL versions from
|
||||
9.5 to 15. PostgreSQL 9.4 is also supported, with some restrictions.
|
||||
9.5 to 14. PostgreSQL 9.4 is also supported, with some restrictions.
|
||||
|
||||
`repmgr` is distributed under the GNU GPL 3 and maintained by EnterpriseDB.
|
||||
|
||||
|
||||
@@ -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://repmgr.org/])
|
||||
|
||||
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)])
|
||||
|
||||
|
||||
48
dbutils.c
48
dbutils.c
@@ -1913,47 +1913,15 @@ can_disable_walsender(PGconn *conn)
|
||||
if (is_superuser_connection(conn, NULL) == true)
|
||||
return true;
|
||||
|
||||
PQExpBufferData query;
|
||||
PGresult *res;
|
||||
bool has_alter_system_priv = false;
|
||||
/*
|
||||
* As of PostgreSQL 14, it is not possible for a non-superuser
|
||||
* 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 */
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<note>
|
||||
<simpara>
|
||||
This section documents a subset of optional configuration settings; for a full
|
||||
and annotated view of all configuration options see the
|
||||
<ulink url="https://raw.githubusercontent.com/EnterpriseDB/repmgr/master/repmgr.conf.sample">sample repmgr.conf file</ulink>
|
||||
for a full and annotated view of all configuration options see the
|
||||
see the <ulink url="https://raw.githubusercontent.com/EnterpriseDB/repmgr/master/repmgr.conf.sample">sample repmgr.conf file</ulink>
|
||||
</simpara>
|
||||
</note>
|
||||
|
||||
|
||||
@@ -159,10 +159,8 @@
|
||||
<simpara>
|
||||
The <command>ALTER SYSTEM</command> is executed by &repmgrd; if
|
||||
<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.
|
||||
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>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
@@ -279,9 +279,7 @@
|
||||
<note>
|
||||
<para>
|
||||
<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.
|
||||
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>.
|
||||
Additionally this requires that the <literal>repmgr</literal> database user is a superuser.
|
||||
</para>
|
||||
</note>
|
||||
<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
|
||||
#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
|
||||
# Can be true in PostgreSQL 9.5 and later only. Until PostgreSQL 14 repmgr user must be a superuser to use 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 )
|
||||
# (PostgreSQL 9.5 and later only; repmgr user must be a superuser for this)
|
||||
#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
|
||||
# WAL receivers
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define REPMGR_VERSION_DATE ""
|
||||
#define REPMGR_VERSION "5.4dev"
|
||||
#define REPMGR_VERSION_NUM 50400
|
||||
#define REPMGR_VERSION "5.4.1"
|
||||
#define REPMGR_VERSION_NUM 50401
|
||||
#define REPMGR_EXTENSION_VERSION "5.4"
|
||||
#define REPMGR_EXTENSION_NUM 50400
|
||||
#define REPMGR_RELEASE_DATE "2022-XX-XX"
|
||||
#define REPMGR_RELEASE_DATE "2023-07-04"
|
||||
#define PG_ACTUAL_VERSION_NUM
|
||||
|
||||
Reference in New Issue
Block a user