Installation#
Packages#
pglogical is available as RPMs via yum for Fedora, CentOS, & RHEL, and as DEBs via apt for Debian and Ubuntu, or as source code here. Please see below for instructions on installing from source.
Installing pglogical with YUM#
The instructions below are valid for Red Hat family of operating systems (RHEL, CentOS, Fedora). Pre-Requisites
Pre-requisites#
These RPMs all require the PGDG PostgreSQL releases from http://yum.postgresql.org/. You cannot use them with stock PostgreSQL releases included in Fedora and RHEL. If you don’t have PostgreSQL already:
Install the appropriate PGDG repo rpm from http://yum.postgresql.org/repopackages.php
Install PostgreSQL
PostgreSQL 9.4:
yum install postgresql94-server postgresql94-contribPostgreSQL 9.5:
yum install postgresql95-server postgresql95-contribPostgreSQL 9.6:
yum install postgresql96-server postgresql96-contribPostgreSQL 10:
yum install postgresql10-server postgresql10-contribPostgreSQL 11:
yum install postgresql11-server postgresql11-contribPostgreSQL 12:
yum install postgresql12-server postgresql12-contribPostgreSQL 13:
yum install postgresql13-server postgresql13-contribPostgreSQL 14:
yum install postgresql14-server postgresql14-contribPostgreSQL 15:
yum install postgresql15-server postgresql15-contrib
Then install the “2ndQuadrant’s General Public” repository for your PostgreSQL version, by running the following instructions as root on the destination Linux server:
PostgreSQL 9.4:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/9.4/rpm | bashPostgreSQL 9.5:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/9.5/rpm | bashPostgreSQL 9.6:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/9.6/rpm | bashPostgreSQL 10:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/10/rpm | bashPostgreSQL 11:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/11/rpm | bashPostgreSQL 12:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/12/rpm | bashPostgreSQL 13:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/13/rpm | bashPostgreSQL 14:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/14/rpm | bashPostgreSQL 15:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/15/rpm | bash
Installation#
Once the repository is installed, you can proceed to pglogical for your PostgreSQL version:
PostgreSQL 9.4:
yum install postgresql94-pglogicalPostgreSQL 9.5:
yum install postgresql95-pglogicalPostgreSQL 9.6:
yum install postgresql96-pglogicalPostgreSQL 10:
yum install postgresql10-pglogicalPostgreSQL 11:
yum install postgresql11-pglogicalPostgreSQL 12:
yum install postgresql12-pglogicalPostgreSQL 13:
yum install postgresql13-pglogicalPostgreSQL 14:
yum install postgresql14-pglogicalPostgreSQL 15:
yum install postgresql15-pglogical
You may be prompted to accept the repository GPG key for package signing:
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-2NDQ-DL-DEFAULT Importing GPG key 0xD6BAF0C3: Userid : "Public repository signing key 2ndQuadrant <ci@2ndquadrant.com>" Fingerprint: 8565 305c ea7d 0b66 4933 d250 9904 cd4b d6ba f0c3 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-2NDQ-DL-DEFAULT Is this ok [y/N]:
If so, accept the key (if it matches the above) by pressing ‘y’ then enter. (It’s signed by the 2ndQuadrant master packaging key, if you want to verify that.)
Installing pglogical with APT#
The instructions below are valid for Debian and all Linux flavors based on Debian (e.g. Ubuntu).
Pre-requisites#
You can install the “2ndQuadrant’s General Public” repository by running
the following instructions as root on the destination Linux server:
curl https://techsupport.enterprisedb.com/api/repository/dl/default/release/deb | bash
Add the http://apt.postgresql.org/ repository. See the site for instructions.
Installation#
Once pre-requisites are complete, installing pglogical is simply a matter of executing the following for your version of PostgreSQL:
PostgreSQL 9.4:
sudo apt-get install postgresql-9.4-pglogicalPostgreSQL 9.5:
sudo apt-get install postgresql-9.5-pglogicalPostgreSQL 9.6:
sudo apt-get install postgresql-9.6-pglogicalPostgreSQL 10:
sudo apt-get install postgresql-10-pglogicalPostgreSQL 11:
sudo apt-get install postgresql-11-pglogicalPostgreSQL 12:
sudo apt-get install postgresql-12-pglogicalPostgreSQL 13:
sudo apt-get install postgresql-13-pglogicalPostgreSQL 14:
sudo apt-get install postgresql-14-pglogicalPostgreSQL 15:
sudo apt-get install postgresql-15-pglogical
From source code#
Source code installs are the same as for any other PostgreSQL extension built using PGXS.
Make sure the directory containing pg_config from the PostgreSQL
release is listed in your PATH environment variable. You might have
to install a -dev or -devel package for your PostgreSQL release
from your package manager if you don’t have pg_config .
Then run make to compile, and make install to install. You might
need to use sudo for the install step.
- e.g. for a typical Fedora or RHEL 7 install, assuming you’re using the
yum.postgresql.org packages for PostgreSQL:
sudo dnf install postgresql95-devel
PATH=/usr/pgsql-9.5/bin:$PATH make clean all
sudo PATH=/usr/pgsql-9.5/bin:$PATH make install