mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
Compare commits
3 Commits
dev/codeow
...
update-doc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
|
||||||
6
HISTORY
6
HISTORY
@@ -1,9 +1,3 @@
|
|||||||
5.4.1 2023-??-??
|
|
||||||
repmgrd: ensure witness node metadata is updated (Ian)
|
|
||||||
|
|
||||||
5.4.0 2023-03-16
|
|
||||||
Support cloning replicas using pg-backup-api
|
|
||||||
|
|
||||||
5.3.3 2022-10-17
|
5.3.3 2022-10-17
|
||||||
Support for PostgreSQL added
|
Support for PostgreSQL added
|
||||||
repmgrd: ensure event notification script is called for event
|
repmgrd: ensure event notification script is called for event
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ replication, and perform administrative tasks such as failover or switchover
|
|||||||
operations.
|
operations.
|
||||||
|
|
||||||
The most recent `repmgr` version (5.3.2) supports all PostgreSQL versions from
|
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.
|
`repmgr` is distributed under the GNU GPL 3 and maintained by EnterpriseDB.
|
||||||
|
|
||||||
|
|||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -16,44 +16,8 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!-- remember to update the release date in ../repmgr_version.h.in -->
|
<!-- remember to update the release date in ../repmgr_version.h.in -->
|
||||||
<sect1 id="release-5.4.1">
|
|
||||||
<title id="release-current">Release 5.4.1</title>
|
|
||||||
<para><emphasis>??? ?? ??????, 202?</emphasis></para>
|
|
||||||
<para>
|
|
||||||
&repmgr; 5.4.1 is a minor release providing ...
|
|
||||||
</para>
|
|
||||||
<sect2>
|
|
||||||
<title>Bug fixes</title>
|
|
||||||
<para>
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
&repmgrd;: ensure witness node metadata is updated if the primary
|
|
||||||
node changed while the witness &repmgrd; was not running.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</sect2>
|
|
||||||
</sect1>
|
|
||||||
|
|
||||||
<sect1 id="release-5.4.0">
|
|
||||||
<title>Release 5.4.0</title>
|
|
||||||
<para><emphasis>Thu 15 March, 2023</emphasis></para>
|
|
||||||
<para>
|
|
||||||
&repmgr; 5.4.0 is a major release.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
This release provides support for cloning standbys using backups taken with <ulink url="http://www.pgbarman.org">barman</ulink>
|
|
||||||
with the use of <ulink url="https://github.com/EnterpriseDB/pg-backup-api">pg-backup-api</ulink>.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Minor fixes to the documentation.
|
|
||||||
</para>
|
|
||||||
</sect1>
|
|
||||||
|
|
||||||
<sect1 id="release-5.3.3">
|
<sect1 id="release-5.3.3">
|
||||||
<title>Release 5.3.3</title>
|
<title id="release-current">Release 5.3.3</title>
|
||||||
<para><emphasis>Mon 17 October, 2022</emphasis></para>
|
<para><emphasis>Mon 17 October, 2022</emphasis></para>
|
||||||
<para>
|
<para>
|
||||||
&repmgr; 5.3.3 is a minor release providing support for
|
&repmgr; 5.3.3 is a minor release providing support for
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<note>
|
<note>
|
||||||
<simpara>
|
<simpara>
|
||||||
This section documents a subset of optional configuration settings; for a full
|
This section documents a subset of optional configuration settings; for a full
|
||||||
and annotated view of all configuration options see the
|
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>
|
see the <ulink url="https://raw.githubusercontent.com/EnterpriseDB/repmgr/master/repmgr.conf.sample">sample repmgr.conf file</ulink>
|
||||||
</simpara>
|
</simpara>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -2394,17 +2394,6 @@ monitor_streaming_witness(void)
|
|||||||
terminate(ERR_BAD_CONFIG);
|
terminate(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* It's possible that the primary changed while the witness repmgrd was not
|
|
||||||
* running. This does not affect the functionality of the witness repmgrd, but
|
|
||||||
* does mean outdated node metadata will be displayed, so update that.
|
|
||||||
*/
|
|
||||||
if (local_node_info.upstream_node_id != primary_node_id)
|
|
||||||
{
|
|
||||||
update_node_record_set_upstream(primary_conn, local_node_info.node_id, primary_node_id);
|
|
||||||
local_node_info.upstream_node_id = primary_node_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
initPQExpBuffer(&event_details);
|
initPQExpBuffer(&event_details);
|
||||||
|
|
||||||
appendPQExpBuffer(&event_details,
|
appendPQExpBuffer(&event_details,
|
||||||
|
|||||||
Reference in New Issue
Block a user