repmgr 3.0.1 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 release, version 3.0.1, introduces a number of new features which further simplify replication administration:
- Standby cloning with pg_basebackup
- Timeline following:
- a standby can be promoted to a master without requiring a restart
- other standbys can connect to the new master without being resynced
- Cascading standby support
- Standbys not directly connected to the master node are not affected during failover of the master to another standby mode
- Replication slot support (PostgreSQL 9.4 and later), simplifying WAL retention management
Additionally many usability improvements have been made based on user feedback, including
better error reporting, removing the requirement to set pg_bindir
if PostgreSQL
binaries are in the default path, and a command line option to examine a server's
configuration and report any changes required for setting up replication.
Note that repmgr 3.0.1 supports PostgreSQL 9.3 and later only.
2ndQuadrant provides professional support services for repmgr - see our website for details.
Changes in release 3.0.1
See the repmgr 3.0 release notes for information about the main changes in the repmgr 3.0 series.
Bug fixes
- Prevent repmgrd from looping infinitely if node was not registered
- When promoting a standby, have repmgr (not repmgrd) handle metadata updates
- Re-use replication slot if it already exists
- Prevent a test SSH connection being made when not needed
- Correct monitoring table column names
New or altered command line options (repmgr)
- New command line option
--check-upstream-config
to report issues with the upstream server configuration - New command line option
--fast-checkpoint
(forces a fast checkpoint when cloning a standby) - New command line option
--rsync-only
(usersync
only to clone a standby) - New command line option
--pg_bindir
- New command line option
--ignore-external-config-files
Compatibility with repmgr 2.x
The configuration file format and options in repmgr 3 are backwards compatible
with repmgr 2.x, so existing configuration files can be used largely as-is.
However please be aware that the priority
setting now defaults
to 100
and that a setting of 0
(or less) indicates
that the node should not be promoted to master, so any priority
in existing repmgr.conf
files should be adjusted accordingly.
Note that the metadata stored by repmgr 3 has changed and the existing metadata
table (repl_nodes
) will need to be upgraded; a script has been
provided for this (repmgr2_repmgr3.sql
).
The following minor compatibility changes have been made:
- The text of many log messages has been revised for brevity and clarity
- A valid value for config option
failover
must be provided (previously it defaulted tomanual
if an unrecognized value was provided) - The config option
pg_bindir
is no longer mandatory
Community and development
repmgr is free and open source software and is licensed under the GPLv3.
Contributions to repmgr are welcome. See the README.md file for information about how to contribute.