2.2. Installing repmgr from packages

We recommend installing repmgr using the available packages for your system.

2.2.1. RedHat/Fedora/CentOS

RPM packages for repmgr are available via Yum through the PostgreSQL Global Development Group RPM repository (http://yum.postgresql.org/). Follow the instructions for your distribution (RedHat, CentOS, Fedora, etc.) and architecture as detailed there.

2ndQuadrant also provides its own RPM packages which are made available at the same time as each repmgr release, as it can take some days for them to become available via the main PGDG repository. See following section for details:

2.2.1.1. 2ndQuadrant repmgr yum repository

Beginning with repmgr 3.1.3, 2ndQuadrant provides a dedicated yum repository for repmgr releases. This repository complements the main PGDG community repository, but enables repmgr users to access the latest repmgr packages before they are available via the PGDG repository, which can take several days to be updated following a fresh repmgr release.

Installation

Compatibility with PGDG Repositories

The 2ndQuadrant repmgr yum repository uses exactly the same package definitions as the main PGDG repository and is effectively a selective mirror for repmgr packages only.

Normally yum should prioritize the repository with the most recent repmgr version. Once the PGDG repository has been updated, it doesn't matter which repository the packages are installed from.

To ensure the 2ndQuadrant repository is always prioritised, install yum-plugin-priorities and set the repository priorities accordingly.

Installing a specific package version

To install a specific package version, execute yum --showduplicates list for the package in question:

        [root@localhost ~]# yum --showduplicates list repmgr96
        Loaded plugins: fastestmirror
        Loading mirror speeds from cached hostfile
         * base: ftp.iij.ad.jp
         * extras: ftp.iij.ad.jp
         * updates: ftp.iij.ad.jp
        Available Packages
        repmgr96.x86_64               3.2-1.el6                    2ndquadrant-repmgr
        repmgr96.x86_64               3.2.1-1.el6                  2ndquadrant-repmgr
        repmgr96.x86_64               3.3-1.el6                    2ndquadrant-repmgr
        repmgr96.x86_64               3.3.1-1.el6                  2ndquadrant-repmgr
        repmgr96.x86_64               3.3.2-1.el6                  2ndquadrant-repmgr
        repmgr96.x86_64               3.3.2-1.rhel6                pgdg96
        repmgr96.x86_64               4.0.0-1.el6                  2ndquadrant-repmgr
        repmgr96.x86_64               4.0.0-1.rhel6                pgdg96

then append the appropriate version number to the package name with a hyphen, e.g.:

        [root@localhost ~]# yum install repmgr96-3.3.2-1.el6

2.2.2. Debian/Ubuntu

.deb packages for repmgr are available from the PostgreSQL Community APT repository (http://apt.postgresql.org/). Instructions can be found in the APT section of the PostgreSQL Wiki (https://wiki.postgresql.org/wiki/Apt).