diff --git a/doc/upgrading-repmgr.xml b/doc/upgrading-repmgr.xml index c8da814f..b79e8d26 100644 --- a/doc/upgrading-repmgr.xml +++ b/doc/upgrading-repmgr.xml @@ -308,12 +308,12 @@ ALTER EXTENSION repmgr UPDATE - converting the repmgr.conf configuration files + converting the repmgr.conf configuration files - upgrading the repmgr schema using CREATE EXTENSION + upgrading the repmgr schema using CREATE EXTENSION (PostgreSQL 12 and earlier) @@ -457,22 +457,31 @@ ALTER EXTENSION repmgr UPDATE Please note that the the conversion script will add an empty placeholder parameter for data_directory, which - is a required parameter from &repmgr; 4. + is a required parameter from &repmgr; 4. This must be manually modified to contain + the correct data directory. - Upgrading the repmgr schema + Upgrading the repmgr schema (PostgreSQL 12 and earlier) Ensure &repmgrd; is not running, or any cron jobs which execute the repmgr binary. - Install repmgr 4 packages; any repmgr 3.x packages + Install the latest &repmgr; package; any repmgr 3.x packages should be uninstalled (if not automatically uninstalled already by your packaging system). Upgrading from repmgr 3.1.1 or earlier + + + If you don't care about any data from the existing &repmgr; installation, + (e.g. the contents of the events and monitoring + tables), the follwing steps can be skipped; proceed to . + + + If your repmgr version is 3.1.1 or earlier, you will need to update the schema to the latest version in the 3.x series (3.3.2) before @@ -501,19 +510,37 @@ ALTER EXTENSION repmgr UPDATE In the database used by the existing &repmgr; installation, execute: - CREATE EXTENSION repmgr FROM unpackaged; + CREATE EXTENSION repmgr FROM unpackaged + This will move and convert all objects from the existing schema into the new, standard repmgr schema. - there must be only one schema matching repmgr_% in the + There must be only one schema matching repmgr_% in the database, otherwise this step may not work. - + + + + Upgrading the repmgr schema (PostgreSQL 13 and later) + + Beginning with PostgreSQL 13, the CREATE EXTENSION ... FROM + syntax is no longer available. In the unlikely event you have ended up with an + installation running PostgreSQL 13 or later and containing the legacy &repmgr; + schema, there is no convenient way of upgrading this; instead you'll just need + to re-register the nodes as detailed in the following section, + which will create the &repmgr; extension automatically. + + + Any historical data you wish to retain (e.g. the contents of the events + and monitoring tables) will need to be exported manually. + + + Re-register each node This is necessary to update the repmgr metadata with some additional items. @@ -523,6 +550,10 @@ ALTER EXTENSION repmgr UPDATE repmgr primary register -f /etc/repmgr.conf --force + + If not already present (e.g. after executing CREATE EXTENSION repmgr FROM unpackaged), + the &repmgr; extension will be automatically created by repmgr primary register. + On each standby node, execute e.g. @@ -535,18 +566,20 @@ ALTER EXTENSION repmgr UPDATE The original repmgr_$cluster schema can be dropped at any time. - - - If you don't care about any data from the existing &repmgr; installation, - (e.g. the contents of the events and monitoring - tables), the manual CREATE EXTENSION step can be skipped; just re-register - each node, starting with the primary node, and the repmgr extension will be - automatically created. - - - + + + Drop the legacy repmgr schema + + Once the cluster has been registered with the current &repmgr; version, the legacy + repmgr_$cluster schema can be dropped at any time with: + + DROP SCHEMA repmgr_$cluster CASCADE + (substitute $cluster with the value of the clustername + variable used in &repmgr; 3.x). + +