repmgr 3.2 released

What is repmgr?

repmgr is an open source package which greatly simplifies the process of setting up and managing replication using streaming replication within a cluster of PostgreSQL servers. Taking advantage of features introduced since PostgreSQL 9.3, repmgr builds on PostgreSQL's core functionality to provide a smooth, user-friendly way of working with the complexities of replication and failover management in high-availability environments.

repmgr consists of two core tools - the repmgr command line interface, which provides functionality for adminstering replication such as cloning standby servers, and repmgrd, a background daemon which monitors nodes in a replication cluster and provides automatic failover support.

The latest repmgr major version, 3.2, provides support for 2ndQuadrant’s Barman archive management server, additional cluster monitoring functionality and several improvements to the standby cloning process.

Note that repmgr 3.2 supports PostgreSQL 9.3 and later only.

2ndQuadrant provides professional support services for repmgr - see our website for details.

New features in repmgr 3.2

Barman support

repmgr 3.2 provides enhanced integration with 2ndQuadrant's Barman backup and recovery manager. In particular it is now possible to clone a standby from a Barman archive, rather than directly from a running database server. This means the server is not subjected to the I/O load caused by a backup, and there's no need to manage WAL retention on the database server. The standby can also use the Barman archive as a fallback source of WAL in case streaming replication is interrupted.

Replication cluster monitoring

Particularly with more complex replication clusters spread over multiple locations, gaining an overview of connection status between nodes can be a tedious and time-consuming process. repmgr 3.2 provides two new commands which help with this, expanding the existing repmgr cluster show:

See the README file for a more in-depth explanation with examples.

Standby cloning improvements

In addition to the ability to clone directly from a Barman archive, various other improvements have been made to the standby cloning process. In particular, by default password-less SSH connection between servers is now optional and only needs to be provided for specific features.

Better integration of OS level server commands

By default, repmgr.conf will use PostgreSQL's standard pg_ctl utility to control a running PostgreSQL server. However it may be better to use the operating system's service management system, e.g. systemd. To specify which service control commands are used, the following repmgr.conf configuration settings are available:

Other new commands and options

The option --wait-sync can be provided to standby register, which causes repmgr to wait for the node record of the standby just registered node to synchronise to the standby. This is necessary for e.g. repmgrd to start, but can take some time if the master node is busy,

Better control over witness server management is provided with the new commands witness register and witness unregister. witness register can be used to set up an existing database instance as a witness server (as before, witness creare will both create and register the witness server).

standby unregister and witness unregister can be executed for a node which is not running by providing the --node parameter with the id of the node to be unregistered.

Other improvements

repmgrd will no longer start on a server which is marked as inactive, if repmgrd's failover mode is set to automatic. This prevents situations where a failed node has been re-cloned but not re-registered, if repmgrd is running it would not treat the node as a promotion candidate during automatic failover.

Upgrading from older repmgr versions

Upgrading from repmgr 3.1.2 ~ 3.1.5

repmgr 3.2 can simply be installed in place of the existing repmgr 3.1.2, repmgr 3.1.3, repmgr 3.1.4 or repmgr 3.1.5 version.

If repmgrd is running, stop and restart the service to ensure it is running with the current repmgr version.

Upgrading from repmgr 3.1.1 or 3.1

To upgrade from repmgr 3.1.1 or repmgr 3.1 version, install repmgr 3.1.5 from your operating system's packaging system or from source, then perform following tasks:

Upgrading from repmgr 3.0

repmgr 3.2 is a drop-in replacement for an existing repmgr 3.0 installation. It should be installed first, either from your operating system's packaging system or from source, then following tasks performed:

Upgrading from repmgr 2.0

repmgr 3.2 can replace an existing repmgr 2.0 installation. It should be installed first, either from your operating system's packaging system or from source, then following tasks performed:

Community and development

repmgr is free and open source software and is licensed under the GPLv3.

Contributions to repmgr are welcome. See CONTRIBUTING.md for information about how to contribute.

2ndQuadrant Logo