10.2. pg_upgrade and repmgr

10.2.1. Upgrading standbys with pg_upgrade and rsync

pg_upgrade requires that if any functions are dependent on a shared library, this library must be present in both the old and new installations before pg_upgrade can be executed.

To minimize the risk of any upgrade issues (particularly if an upgrade to a new major repmgr version is involved), we recommend upgrading repmgr on the old server before running pg_upgrade to ensure that old and new versions are the same.


This issue applies to any PostgreSQL extension which has dependencies on a shared library.

For further details please see the pg_upgrade documentation.

If replication slots are in use, bear in mind these will not be recreated by pg_upgrade. These will need to be recreated manually.


Use repmgr node check to determine which replication slots need to be recreated.

10.2.1. Upgrading standbys with pg_upgrade and rsync

If you are intending to upgrade a standby using the rsync method described in the pg_upgrade documentation, you must ensure the standby's replication configuration is present and correct before starting the standby.

Use repmgr standby clone --replication-conf-only to generate the correct replication configuration.


If upgrading from PostgreSQL 11 or earlier, be sure to delete recovery.conf, if present, otherwise PostgreSQL will refuse to start.