&repmgr; package details
packages
This section provides technical details about various &repmgr; binary
packages, such as location of the installed binaries and
configuration files.
CentOS Packages
packages
CentOS packages
CentOS
package information
Currently, &repmgr; RPM packages are provided for versions 6.x and 7.x of CentOS. These should also
work on matching versions of Red Hat Enterprise Linux, Scientific Linux and Oracle Enterprise Linux;
together with CentOS, these are the same RedHat-based distributions for which the main community project
(PGDG) provides packages (see the PostgreSQL RPM Building Project
page for details).
Note these &repmgr; RPM packages are not designed to work with SuSE/OpenSuSE.
&repmgr; packages are designed to be compatible with community-provided PostgreSQL packages.
They may not work with vendor-specific packages such as those provided by RedHat for RHEL
customers, as the filesystem layout may be different to the community RPMs.
Please contact your support vendor for assistance.
CentOS repositories
&repmgr; packages are available from the public 2ndQuadrant repository, and also the
PostgreSQL community repository. The 2ndQuadrant repository is updated immediately
after each
&repmgr; release.
2ndQuadrant public repository
Repository URL:
https://dl.2ndquadrant.com/
Repository documentation:
https://repmgr.org/docs/current/installation-packages.html#INSTALLATION-PACKAGES-REDHAT-2NDQ
PostgreSQL community repository (PGDG)
Repository URL:
https://yum.postgresql.org/repopackages.php
Repository documentation:
https://yum.postgresql.org/
CentOS package details
The two tables below list relevant information, paths, commands etc. for the &repmgr; packages on
CentOS 7 (with systemd) and CentOS 6 (no systemd). Substitute the appropriate PostgreSQL major
version number for your installation.
For PostgreSQL 9.6 and lower, the CentOS packages use a mixture of 9.6
and 96 in various places to designate the major version; e.g. the
package name is repmgr96, but the binary directory is
/var/lib/pgsql/9.6/data.
From PostgreSQL 10, the first part of the version number (e.g. 10) is
the major version, so there is more consistency in file/path/package naming
(package repmgr10, binary directory /var/lib/pgsql/10/data).
CentOS 7 packages
Package name example:
repmgr10-4.0.4-1.rhel7.x86_64
Metapackage:
(none)
Installation command:
yum install repmgr10
Binary location:
/usr/pgsql-10/bin
repmgr in default path:
NO
Configuration file location:
/etc/repmgr/10/repmgr.conf
Data directory:
/var/lib/pgsql/10/data
repmgrd service command:
systemctl [start|stop|restart|reload] repmgr10
repmgrd service file location:
/usr/lib/systemd/system/repmgr10.service
repmgrd log file location:
(not specified by package; set in repmgr.conf)
CentOS 6 packages
Package name example:
repmgr96-4.0.4-1.rhel6.x86_64
Metapackage:
(none)
Installation command:
yum install repmgr96
Binary location:
/usr/pgsql-9.6/bin
repmgr in default path:
NO
Configuration file location:
/etc/repmgr/9.6/repmgr.conf
Data directory:
/var/lib/pgsql/9.6/data
repmgrd service command:
service [start|stop|restart|reload] repmgr-9.6
repmgrd service file location:
/etc/init.d/repmgr-9.6
repmgrd log file location:
/var/log/repmgr/repmgrd-9.6.log
Debian/Ubuntu Packages
packages
Debian/Ubuntu packages
Debian/Ubuntu
package information
&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.
APT repository
&repmgr; packages are available from the PostgreSQL Community APT repository,
which is updated immediately after each &repmgr; release.
2ndQuadrant public repository
Repository URL:
https://dl.2ndquadrant.com/
Repository documentation:
https://repmgr.org/docs/current/installation-packages.html#INSTALLATION-PACKAGES-DEBIAN
PostgreSQL Community APT repository (PGDG)
Repository URL:
http://apt.postgresql.org/
Repository documentation:
https://wiki.postgresql.org/wiki/Apt
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 for some specifics related
to configuring the &repmgrd; daemon.
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)
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.
Snapshot packages
snapshot packages
packages
snaphots
For testing new features and bug fixes, from time to time 2ndQuadrant provides
so-called "snapshot packages" via its public repository. These packages
are built from the &repmgr; source at a particular point in time, and are not formal
releases.
We do not recommend installing these packages in a production environment
unless specifically advised.
To install a snapshot package, it's necessary to install the 2ndQuadrant public snapshot repository,
following the instructions here: https://dl.2ndquadrant.com/default/release/site/ but replace release with snapshot
in the appropriate URL.
For example, to install the snapshot RPM repository for PostgreSQL 9.6, execute (as root):
curl https://dl.2ndquadrant.com/default/snapshot/get/9.6/rpm | bash
or as a normal user with root sudo access:
curl https://dl.2ndquadrant.com/default/snapshot/get/9.6/rpm | sudo bash
Alternatively you can browse the repository here:
https://dl.2ndquadrant.com/default/snapshot/browse/.
Once the repository is installed, installing or updating &repmgr; will result in the latest snapshot
package being installed.
The package name will be formatted like this:
repmgr96-4.1.1-0.0git320.g5113ab0.1.el7.x86_64.rpm
containg the snapshot build number (here: 320) and the hash
of the git commit it was built from (here: g5113ab0).
Note that the next formal release (in the above example 4.1.1), once available,
will install in place of any snapshot builds.
Installing old package versions
old packages
packages
old versions
installation
old package versions
Debian/Ubuntu
An archive of old packages (3.3.2 and later) for Debian/Ubuntu-based systems is available here:
http://atalia.postgresql.org/morgue/r/repmgr/
RHEL/CentOS
Old RPM packages (3.2 and later) can be retrieved from the
(deprecated) 2ndQuadrant repository at
http://packages.2ndquadrant.com/
by installing the appropriate repository RPM:
http://packages.2ndquadrant.com/repmgr/yum-repo-rpms/repmgr-fedora-1.0-1.noarch.rpm
http://packages.2ndquadrant.com/repmgr/yum-repo-rpms/repmgr-rhel-1.0-1.noarch.rpm
Old versions can be located with e.g.:
yum --showduplicates list repmgr96
(substitute the appropriate package name; see ) and installed with:
yum install {package_name}-{version}
where {package_name} is the base package name (e.g. repmgr96)
and {version} is the version listed by the
yum --showduplicates list ... command, e.g. 4.0.6-1.rhel6.
For example:
yum install repmgr96-4.0.6-1.rhel6
Information for packagers
packages
information for packagers
We recommend patching the following parameters when
building the package as built-in default values for user convenience.
These values can nevertheless be overridden by the user, if desired.
Configuration file location: the default configuration file location
can be hard-coded by patching package_conf_file
in configfile.c:
/* packagers: if feasible, patch configuration file path into "package_conf_file" */
char package_conf_file[MAXPGPATH] = "";
See also:
PID file location: the default &repmgrd; PID file
location can be hard-coded by patching package_pid_file
in repmgrd.c:
/* packagers: if feasible, patch PID file path into "package_pid_file" */
char package_pid_file[MAXPGPATH] = "";
See also: