D.2. Debian/Ubuntu Packages

repmgr .deb packages are provided via the PostgreSQL Community APT repository, and are available for each community-supported PostgreSQL version, currently supported Debian releases, and currently supported Ubuntu LTS releases.

D.2.1. APT repository

repmgr packages are available from the PostgreSQL Community APT repository, which is updated immediately after each repmgr release.

Table D-5. PostgreSQL Community APT repository (PGDG)

Repository URL:http://apt.postgresql.org/
Repository documentation:https://wiki.postgresql.org/wiki/Apt)

D.2.2. Debian/Ubuntu package details

The table below lists relevant information, paths, commands etc. for the repmgr packages on Debian 9.x ("Stretch"). Substitute the appropriate PostgreSQL major version number for your installation.

See also Section 13.2.1 for some specifics related to configuring the repmgrd daemon.

Table D-6. Debian 9.x packages

Package name example:postgresql-10-repmgr
Metapackage:repmgr-common
Installation command:apt-get install postgresql-10-repmgr
Binary location:/usr/lib/postgresql/10/bin
repmgr in default path:Yes (via wrapper script /usr/bin/repmgr)
Configuration file location:(not set by package)
Data directory:/var/lib/postgresql/10/main
PostgreSQL service command:systemctl [start|stop|restart|reload] postgresql@10-main
repmgrd service command:systemctl [start|stop|restart|reload] repmgrd
repmgrd service file location:/etc/init.d/repmgrd (defaults in: /etc/defaults/repmgrd)
repmgrd log file location:(not specified by package; set in repmgr.conf)

Note: Instead of using the systemd service command directly, it's recommended to execute pg_ctlcluster (as root, either directly or via sudo), e.g.:

            pg_ctlcluster 10 main [start|stop|restart|reload]

For pre-systemd systems, pg_ctlcluster can be executed directly by the postgres user.