repmgr 3.3 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.

Note that repmgr 3.3 supports PostgreSQL 9.3 and later only.

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

Improvements in repmgr 3.3

repmgr 3.3 provides a number of usability improvements for the repmgr command line utility, particularly for the standby clone and standby register commands. These changes are primarily aimed at making repmgr easier to use when provisioning complex replication clusters.

repmgrd users should take note of the changes to repmgr logging behaviour.

From repmgr 3.3, support for the upcoming PostgreSQL 10 release will be provided as far as possible. PostgreSQL 10 is still under development with significant changes expected to the implementation of replication functionality; anyone wishing to test repmgr with PostgreSQL 10 should build from the repmgr master branch.

repmgr logs to the console by default

Prior to repmgr 3.3, the repmgr command line utility would log to the to the same location as repmgrd, typically a file or syslog. It will now always log to the console by default, which is more intuitive behaviour for a command line utility.

However in some circumstances, such as when repmgr is executed by repmgrd during a failover event, it makes sense to capture repmgr's log output - this can be done by supplying the command-line option --log-to-file to repmgr.

New option --upstream-conninfo for repmgr standby clone

This enables explicit provision of a conninfo string for the primary_conninfo entry in recovery.conf.

New option --no-conninfo-password for repmgr standby clone

This prevents repmgr from writing a password to the primary_conninfo line in recovery.conf.

repmgr standby register can be used when standby is not running

Previously repmgr standby register required the standby PostgreSQL node to be running before it can be registered. By providing connection details for the master node, it is now possible to register the standby before it is started, which can be useful in provisioning scenarios.

repmgr standby register can create a dummy entry for an upstream node

When setting up cascading replication, if a downstream standby's upstream node has not been registered, the downstream standby can be registered with repmgr standby register --force, which will create a dummy placeholder entry for the upstream node. Note that this node must also be registered with repmgr standby register --force to overwrite the placeholder entry. This functionality is useful for provisioning scenarios where it's not feasible to control the timing/ordering of standby cloning.

Bugfixes in repmgr 3.3

Parameters written to the primary_conninfo line in recovery.conf will now be escaped if necessary.

repmgr standby register --force now works for standbys in cascading replication which have a downstream node attached.

Upgrading from older repmgr versions

Upgrading from repmgr 3.1.2 or later

repmgr 3.3 can simply be installed in place of any version from repmgr 3.1.2 onwards.

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.3 from your operating system's packaging system or from source, then perform following tasks:

Upgrading from repmgr 3.0.x

repmgr 3.3 is a drop-in replacement for an existing repmgr 3.0.x 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.3 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