Compare commits

..

18 Commits

Author SHA1 Message Date
Martín Marqués
7b6e867065 Replace 9.4 with 10, as that's the minimal version we support now with 5.4.1
Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-11-16 10:04:37 -03:00
Martín Marqués
cc9dfd5b9c Adding Postgres version 16 support in 5.4.1
We've done extensive testing of the current version of repmgr against the
new version 16 of Postgres. The tests have passed which gives us the
green light to add the version as supported in repmgr 5.4.1.

The commit only addresses documentation amendments

Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-11-16 10:04:37 -03:00
Martín Marqués
26f9cb3f95 Merge pull request #817 from EnterpriseDB/generate-5.4.1-release
Generate 5.4.1 release
2023-07-04 10:25:29 -03:00
Sidorov Pavel
890cbd9fca Update README.md
upd upper version according to https://repmgr.org
2023-07-04 14:56:54 +02:00
Mario Gonzalez
440ba5fbb4 configure.in: bumping to 5.4.1 release.
This release contains all changes related to the new pg-backupapi mode
along with the related documentation. In the previous release, we didn't
include any documentation at all, just the required C code.
2023-07-04 14:56:52 +02:00
Martín Marqués
20f39e2fbe Add release notes for repmgr release 5.4.0
This release added support for pg-backup-api. Here we add the
release notes which expose the new feature.

Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-07-04 14:55:32 +02:00
Martín Marqués
afdeb5d7b2 Various improvements and fixes to the pg-backup-api restore section on the docs
I added a paragraph at the beginning of the section on where to look for
instructions on how to install the pg-backup-api rest API.

Fixed typos and some gramatical changes. Also reworded the first paragraph
(which is now the second one).

Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-07-04 14:52:15 +02:00
Martín Marqués
7d45ab04b3 New sect1 block has to be inside the sect1. The closing tag has to go at the end.
Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-07-04 14:52:05 +02:00
Mario Gonzalez
7af74c4fda Adding new mode to clone standbys.
repmgr v5.4.0 supports this new mode called `pg_backupapi` which is
enabled by defining `pg_backupapi_host` in repmgr.conf.
2023-07-04 14:48:24 +02:00
Martín Marqués
1010aeb3dd Merge pull request #816 from EnterpriseDB/dev/fix-documentation-typos
Fix documentation typos
2023-07-04 09:11:44 -03:00
Martín Marqués
c58c95c9f1 Typo in the documentation
Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-07-04 14:08:53 +02:00
Dee Dee Rothery
3887637f1e Update configuration-file-optional-settings.xml 2023-07-04 14:08:44 +02:00
Israel Barth Rubio
7a84e34630 Bump version number
5.4.1

Signed-off-by: Israel Barth Rubio <israel.barth@enterprisedb.com>
2023-07-04 08:41:22 -03:00
Ian Barwick
9ab4acea78 repmgrd: ensure witness node metadata is updated
If the primary changed while the witness repmgrd was not running,
ensure the witness's upstream node ID is updated when the witness
repmgrd is restarted.
2023-06-08 16:39:52 +09:00
Martín Marqués
ef962436f7 Add release notes for repmgr release 5.4.0
This release added support for pg-backup-api. Here we add the
release notes which expose the new feature.

Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-03-24 18:34:53 +00:00
Martín Marqués
9a68206b4a Various improvements and fixes to the pg-backup-api restore section on the docs
I added a paragraph at the beginning of the section on where to look for
instructions on how to install the pg-backup-api rest API.

Fixed typos and some gramatical changes. Also reworded the first paragraph
(which is now the second one).

Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-03-24 18:25:27 +00:00
Martín Marqués
31af938354 New sect2 block has to be inside the sect1. The closing tag has to go at the end.
Signed-off-by: Martín Marqués <martin.marques@enterprisedb.com>
2023-03-24 18:25:12 +00:00
Mario Gonzalez
061025b62f Adding new mode to clone standbys.
repmgr v5.4.0 supports this new mode called `pg_backupapi` which is
enabled by defining `pg_backupapi_host` in repmgr.conf.
2023-03-24 18:24:56 +00:00
11 changed files with 23 additions and 68 deletions

7
.github/CODEOWNERS vendored
View File

@@ -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

View File

@@ -1,4 +1,4 @@
5.4.1 2023-??-??
5.4.1 2023-07-04
repmgrd: ensure witness node metadata is updated (Ian)
5.4.0 2023-03-16

View File

@@ -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_CONFIG_HEADER(config.h)
AC_CONFIG_HEADERS([config.h])
AC_ARG_VAR([PG_CONFIG], [Location to find pg_config for target PostgreSQL (default PATH)])

View File

@@ -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;
}
/*

View File

@@ -18,9 +18,9 @@
<!-- 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><emphasis>Tue 04 July, 2023</emphasis></para>
<para>
&repmgr; 5.4.1 is a minor release providing ...
&repmgr; 5.4.1 is a minor release providing a fix for witness metadata update
</para>
<sect2>
<title>Bug fixes</title>

View File

@@ -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>

View File

@@ -14,7 +14,7 @@
</para>
<para>
&repmgr; &repmgrversion; is compatible with all PostgreSQL versions from 9.4. See
&repmgr; &repmgrversion; is compatible with all PostgreSQL versions from 10. See
section <link linkend="install-compatibility-matrix">&repmgr; compatibility matrix</link>
for an overview of version compatibility.
</para>
@@ -120,13 +120,13 @@
&repmgr; 5.4
</entry>
<entry>
(dev)
YES
</entry>
<entry>
<link linkend="release-current">&repmgrversion;</link> (&releasedate;)
</entry>
<entry>
9.4, 9.5, 9.6, 10, 11, 12, 13, 15
10, 11, 12, 13, 14, 15, 16
</entry>
<entry>
&nbsp;

View File

@@ -26,7 +26,7 @@
<abstract>
<para>
This is the official documentation of &repmgr; &repmgrversion; for
use with PostgreSQL 9.4 - PostgreSQL 15.
use with PostgreSQL 10 - PostgreSQL 16.
</para>
<para>
&repmgr; is being continually developed and we strongly recommend using the

View File

@@ -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>

View File

@@ -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

View File

@@ -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