repmgr 3.1.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 major version, 3.1, leverages improvements included with PostgreSQL 9.5 to provide support for switchover, a common administrative task where the roles of primary and standby server are swapped in a controlled manner to facilitate software and hardware maintenance.
Note that repmgr 3.1 supports PostgreSQL 9.3 and later only.
Upgrading from repmgr 3.1
repmgr 3.1.1 can simply be installed in placed of the existing repmgr 3.1 version. If repmgrd is running, stop and restart the service to ensure it is running with the current repmgr version.
Upgrading from repmgr 3.0
repmgr 3.1.1 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:
- Run the provided repmgr database upgrade script, sql/repmgr3.0_repmgr3.1.sql. This introduces one new convenience view, repl_show_nodes, but otherwise no changes have been made to repmgr's metadata schema.
- If repmgrd is running, stop and restart the service to ensure it is running with the current repmgr version.
Upgrading from repmgr 2.0
repmgr 3.1.1 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:
- If repmgrd is running, stop the service.
Run the provided repmgr database upgrade script, sql/repmgr2_repmgr3.sql,
which is required to expand the
- Run the provided repmgr database upgrade script, sql/repmgr3.0_repmgr3.1.sql. This introduces one new convenience view, repl_show_nodes.
- Restart repmgrd if required.
Changes in release 3.1.1
repmgr 3.1 introduces the
repmgr standby switchover command,
which automatically promotes the current standby to master and demotes the
old master to a standby, a previously complex manual procedure. This builds on
utility introduced with PostgreSQL 9.5.
Note that for PostgreSQL 9.3 and 9.4, pg_rewind can be compiled as an external utility; see the repmgr documentation for details.
- To prevent data directory permissions being changed by accident, both repmgr repmgrd will now refuse to run when executed by the root user.
New or altered command line options (repmgr)
By default, repmgr witness create will no longer prompt for a superuser password. The new option -P/--pwprompt will issue a prompt for the password of the witness database superuser and the repmgr user. This behaviour more closely matches that of the standard command line utility createuser. <
--initdb-no-pwpromptis now deprecated.
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.