repmgr is a suite of open-source tools to manage replication and failover within a cluster of PostgreSQL servers. It supports and enhances PostgreSQL's built-in streaming replication, which provides a single read/write primary server and one or more read-only standbys containing near-real time copies of the primary server's database. It provides two main tools:
A command-line tool used to perform administrative tasks such as:
A daemon which actively monitors servers in a replication cluster and performs the following tasks: