Upgrading repmgr 4.x and later
&repmgr; 4.x is implemented as a PostgreSQL extension; normally the upgrade consists
- of the two following steps:
+ of the following steps:
+
+
+
+ Stop repmgrd (if in use) on all nodes where it is running
+
+
+
Install the updated package (or compile the updated source)
-
-
- repmgrd (if running) must be restarted.
-
-
+
+
For major releases, e.g. from 4.0.x to 4.1,
@@ -43,6 +47,13 @@
changes to the &repmgr; extension objects.
+
+
+
+ Start repmgrd (if in use).
+
+
+
@@ -54,8 +65,86 @@
Note that it may be necessary to restart the PostgreSQL server if the upgrade contains
changes to the shared object file used by repmgrd; check the
- release notes for details.
+ release notes for details.
+
+
+
+ upgrading
+ repmgr 4.x and later
+
+ Upgrading a replication cluster
+
+ The same &repmgr; "major version" (e.g. 4.2) must be
+ installed on all nodes in the replication cluster. While it's possible to have differing
+ &repmgr; "minor versions" (e.g. 4.2.1) on different nodes,
+ we strongly recommend updating all nodes to the latest minor version.
+
+
+
+ Minor version upgrades can be performed in any order on the nodes in the replicaiton
+ cluster. In general it makes sense to start on the primary.
+
+
+ A PostgreSQL restart is not required for minor version upgrades.
+
+
+
+ "major version" upgrades need to be planned more carefully, as they may include
+ changes to the &repmgr; metadata (which need to be propagated from the primary to all
+ standbys) and/or changes to the shared object file used by repmgrd
+ (which require a PostgreSQL restart).
+
+
+ With this in mind,
+
+
+
+
+
+
+
+ Stop repmgrd (if in use) on all nodes where it is running
+
+
+
+
+
+ Install the updated package (or compile the updated source) on all nodes.
+
+
+
+
+
+ On the primary node, execute
+
+ ALTER EXTENSION repmgr UPDATE
+ in the database where &repmgr; is installed.
+
+
+
+
+
+ If necessary, restart PostgreSQL, then repmgrd (if in use)
+ on each node. The order in which this is applied to individual nodes is not critical,
+ and it's also fine to restart on all nodes first before starting repmgrd.
+
+
+ Note that if the upgrade requires a PostgreSQL restart, repmgrd
+ will only function correctly once all nodes have been restarted.
+
+
+
+
+
+
+ If the &repmgr; upgrade requires a PostgreSQL restart, combine the &repmgr; upgrade
+ with a PostgreSQL minor version upgrade, which will require a restart in any case.
+ New PostgreSQL minor version are usually released every couple of months.
+
+
+
+
@@ -95,6 +184,13 @@
be recreated by pg_upgrade. These will need to
be recreated manually.
+
+
+ Use repmgr node check
+ to determine which replacation slots need to be recreated.
+
+
+