mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
429 lines
14 KiB
Plaintext
429 lines
14 KiB
Plaintext
<appendix id="appendix-packages" xreflabel="Package details">
|
|
<indexterm>
|
|
<primary>packages</primary>
|
|
</indexterm>
|
|
|
|
<title>&repmgr; package details</title>
|
|
<para>
|
|
This section provides technical details about various &repmgr; binary
|
|
packages, such as location of the installed binaries and
|
|
configuration files.
|
|
</para>
|
|
|
|
<sect1 id="packages-centos" xreflabel="CentOS packages">
|
|
<title>CentOS Packages</title>
|
|
<indexterm>
|
|
<primary>packages</primary>
|
|
<secondary>CentOS packages</secondary>
|
|
</indexterm>
|
|
<para>
|
|
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 <ulink url="https://yum.postgresql.org/">PostgreSQL RPM Building Project</ulink>
|
|
page for details).
|
|
</para>
|
|
|
|
<para>
|
|
Note these &repmgr; RPM packages are not designed to work with SuSE/OpenSuSE.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
&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.
|
|
</para>
|
|
</note>
|
|
|
|
<sect2 id="packages-centos-repositories">
|
|
<title>CentOS repositories</title>
|
|
|
|
<para>
|
|
&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.
|
|
</para>
|
|
|
|
<table id="centos-2ndquadrant-repository">
|
|
<title>2ndQuadrant public repository</title>
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
<row>
|
|
<entry>Repository URL:</entry>
|
|
<entry><ulink url="https://dl.2ndquadrant.com/">https://dl.2ndquadrant.com/</ulink></entry>
|
|
</row>
|
|
<row>
|
|
<entry>Repository documentation:</entry>
|
|
<entry><ulink url="https://repmgr.org/docs/4.1/installation-packages.html#INSTALLATION-PACKAGES-REDHAT-2NDQ">https://repmgr.org/docs/4.1/installation-packages.html#INSTALLATION-PACKAGES-REDHAT-2NDQ</ulink></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
<table id="centos-pgdg-repository">
|
|
<title>PostgreSQL community repository (PGDG)</title>
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
<row>
|
|
<entry>Repository URL:</entry>
|
|
<entry><ulink url="https://yum.postgresql.org/repopackages.php">https://yum.postgresql.org/repopackages.php</ulink></entry>
|
|
</row>
|
|
<row>
|
|
<entry>Repository documentation:</entry>
|
|
<entry><ulink url="https://yum.postgresql.org/">https://yum.postgresql.org/</ulink></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
</sect2>
|
|
|
|
<sect2 id="packages-centos-details">
|
|
<title>CentOS package details</title>
|
|
|
|
<para>
|
|
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.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
For PostgreSQL 9.6 and lower, the CentOS packages use a mixture of <literal>9.6</literal>
|
|
and <literal>96</literal> in various places to designate the major version; e.g. the
|
|
package name is <literal>repmgr96</literal>, but the binary directory is
|
|
<filename>/var/lib/pgsql/9.6/data</filename>.
|
|
</para>
|
|
<para>
|
|
From PostgreSQL 10, the first part of the version number (e.g. <literal>10</literal>) is
|
|
the major version, so there is more consistency in file/path/package naming
|
|
(package <literal>repmgr10</literal>, binary directory <filename>/var/lib/pgsql/10/data</filename>).
|
|
</para>
|
|
</note>
|
|
|
|
|
|
<table id="centos-7-packages">
|
|
<title>CentOS 7 packages</title>
|
|
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
|
|
<row>
|
|
<entry>Package name example:</entry>
|
|
<entry><filename>repmgr10-4.0.4-1.rhel7.x86_64</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Metapackage:</entry>
|
|
<entry>(none)</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Installation command:</entry>
|
|
<entry><literal>yum install repmgr10</literal></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Binary location:</entry>
|
|
<entry><filename>/usr/pgsql-10/bin</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgr in default path:</entry>
|
|
<entry>NO</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Configuration file location:</entry>
|
|
<entry><filename>/etc/repmgr/10/repmgr.conf</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Data directory:</entry>
|
|
<entry><filename>/var/lib/pgsql/10/data</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd service command:</entry>
|
|
<entry><command>systemctl [start|stop|restart|reload] repmgr10</command></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd service file location:</entry>
|
|
<entry><filename>/usr/lib/systemd/system/repmgr10.service</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd log file location:</entry>
|
|
<entry>(not specified by package; set in <filename>repmgr.conf</filename>)</entry>
|
|
</row>
|
|
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
<table id="centos-6-packages">
|
|
<title>CentOS 6 packages</title>
|
|
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
|
|
<row>
|
|
<entry>Package name example:</entry>
|
|
<entry><filename>repmgr96-4.0.4-1.rhel6.x86_64</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Metapackage:</entry>
|
|
<entry>(none)</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Installation command:</entry>
|
|
<entry><literal>yum install repmgr96</literal></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Binary location:</entry>
|
|
<entry><filename>/usr/pgsql-9.6/bin</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgr in default path:</entry>
|
|
<entry>NO</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Configuration file location:</entry>
|
|
<entry><filename>/etc/repmgr/9.6/repmgr.conf</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Data directory:</entry>
|
|
<entry><filename>/var/lib/pgsql/9.6/data</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd service command:</entry>
|
|
<entry><literal>service [start|stop|restart|reload] repmgr-9.6</literal></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd service file location:</entry>
|
|
<entry><literal>/etc/init.d/repmgr-9.6</literal></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd log file location:</entry>
|
|
<entry><filename>/var/log/repmgr/repmgrd-9.6.log</filename></entry>
|
|
</row>
|
|
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
</sect2>
|
|
</sect1>
|
|
|
|
|
|
|
|
|
|
<sect1 id="packages-debian-ubuntu" xreflabel="Debian/Ubuntu packages">
|
|
<title>Debian/Ubuntu Packages</title>
|
|
<indexterm>
|
|
<primary>packages</primary>
|
|
<secondary>Debian/Ubuntu packages</secondary>
|
|
</indexterm>
|
|
<para>
|
|
&repmgr; <literal>.deb</literal> 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.
|
|
</para>
|
|
|
|
<sect2 id="packages-apt-repository">
|
|
<title>APT repository</title>
|
|
|
|
<para>
|
|
&repmgr; packages are available from the PostgreSQL Community APT repository,
|
|
which is updated immediately after each &repmgr; release.
|
|
</para>
|
|
|
|
|
|
<table id="apt-2ndquadrant-repository">
|
|
<title>2ndQuadrant public repository</title>
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
<row>
|
|
<entry>Repository URL:</entry>
|
|
<entry><ulink url="https://dl.2ndquadrant.com/">https://dl.2ndquadrant.com/</ulink></entry>
|
|
</row>
|
|
<row>
|
|
<entry>Repository documentation:</entry>
|
|
<entry><ulink url="https://repmgr.org/docs/4.1/installation-packages.html#INSTALLATION-PACKAGES-DEBIAN">https://repmgr.org/docs/4.1/installation-packages.html#INSTALLATION-PACKAGES-DEBIAN</ulink></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
|
|
<table id="apt-repository">
|
|
<title>PostgreSQL Community APT repository (PGDG)</title>
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
<row>
|
|
<entry>Repository URL:</entry>
|
|
<entry><ulink url="http://apt.postgresql.org/">http://apt.postgresql.org/</ulink></entry>
|
|
</row>
|
|
<row>
|
|
<entry>Repository documentation:</entry>
|
|
<entry><ulink url="https://wiki.postgresql.org/wiki/Apt)">https://wiki.postgresql.org/wiki/Apt)</ulink></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</sect2>
|
|
|
|
<sect2 id="packages-debian-details">
|
|
<title>Debian/Ubuntu package details</title>
|
|
|
|
<para>
|
|
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.
|
|
</para>
|
|
<para>
|
|
See also <xref linkend="repmgrd-configuration-debian-ubuntu"> for some specifics related
|
|
to configuring the <application>repmgrd</application> daemon.
|
|
</para>
|
|
|
|
<table id="debian-9-packages">
|
|
<title>Debian 9.x packages</title>
|
|
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
|
|
<row>
|
|
<entry>Package name example:</entry>
|
|
<entry><filename>postgresql-10-repmgr</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Metapackage:</entry>
|
|
<entry><filename>repmgr-common</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Installation command:</entry>
|
|
<entry><literal>apt-get install postgresql-10-repmgr</literal></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Binary location:</entry>
|
|
<entry><filename>/usr/lib/postgresql/10/bin</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgr in default path:</entry>
|
|
<entry>Yes (via wrapper script <filename>/usr/bin/repmgr</filename>)</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Configuration file location:</entry>
|
|
<entry>(not set by package)</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>Data directory:</entry>
|
|
<entry><filename>/var/lib/postgresql/10/main</filename></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>PostgreSQL service command:</entry>
|
|
<entry><command>systemctl [start|stop|restart|reload] postgresql@10-main</command></entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd service command:</entry>
|
|
<entry><command>systemctl [start|stop|restart|reload] repmgrd</command></entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd service file location:</entry>
|
|
<entry><filename>/etc/init.d/repmgrd</filename> (defaults in: <filename>/etc/defaults/repmgrd</filename>)</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>repmgrd log file location:</entry>
|
|
<entry>(not specified by package; set in <filename>repmgr.conf</filename>)</entry>
|
|
</row>
|
|
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
<note>
|
|
<para>
|
|
Instead of using the <application>systemd</application> service command directly,
|
|
it's recommended to execute <command>pg_ctlcluster</command> (as <literal>root</literal>,
|
|
either directly or via <command>sudo</command>), e.g.:
|
|
<programlisting>
|
|
<command>pg_ctlcluster 10 main [start|stop|restart|reload]</command></programlisting>
|
|
</para>
|
|
<para>
|
|
For pre-<application>systemd</application> systems, <command>pg_ctlcluster</command>
|
|
can be executed directly by the <literal>postgres</literal> user.
|
|
</para>
|
|
</note>
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|
|
|
|
<sect1 id="packages-packager-info" xreflabel="Information for packagers">
|
|
<title>Information for packagers</title>
|
|
<indexterm>
|
|
<primary>packages</primary>
|
|
<secondary>information for packagers</secondary>
|
|
</indexterm>
|
|
<para>
|
|
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.
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
Configuration file location: the default configuration file location
|
|
can be hard-coded by patching <varname>package_conf_file</varname>
|
|
in <filename>configfile.c</filename>:
|
|
<programlisting>
|
|
/* packagers: if feasible, patch configuration file path into "package_conf_file" */
|
|
char package_conf_file[MAXPGPATH] = "";</programlisting>
|
|
</para>
|
|
<para>
|
|
See also: <xref linkend="configuration-file">
|
|
</para>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<para>
|
|
PID file location: the default <application>repmgrd</application> PID file
|
|
location can be hard-coded by patching <varname>package_pid_file</varname>
|
|
in <filename>repmgrd.c</filename>:
|
|
<programlisting>
|
|
/* packagers: if feasible, patch PID file path into "package_pid_file" */
|
|
char package_pid_file[MAXPGPATH] = "";</programlisting>
|
|
</para>
|
|
<para>
|
|
See also: <xref linkend="repmgrd-pid-file">
|
|
</para>
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
</sect1>
|
|
</appendix>
|