2ndQuadrant is now part of EDB

Bringing together some of the world's top PostgreSQL experts.

2ndQuadrant | PostgreSQL
Mission Critical Databases
  • Contact us
  • EN
    • FR
    • IT
    • ES
    • DE
    • PT
  • Support & Services
    • Support
      • 24/7 PostgreSQL Support
      • Developer Support
    • DBA Services
      • Remote DBA
      • Database Monitoring
    • Consulting Services
      • Health Check
      • Performance Tuning
      • Database Security Audit
      • PostgreSQL Upgrade
    • Migration Services
      • Migrate to PostgreSQL
      • Migration Assessment
  • Products
    • Postgres-BDR ®
    • PostgreSQL High Availability
    • Kubernetes Operators for BDR & PostgreSQL
    • Managed PostgreSQL in the Cloud
    • Installers
      • Postgres Installer
      • 2UDA
    • 2ndQPostgres
    • pglogical
    • Barman
    • repmgr
    • OmniDB
    • SQL Firewall
    • Postgres-XL
  • Downloads
    • Installers
      • Postgres Installer
      • 2UDA – Unified Data Analytics
    • Whitepapers
      • Business Case for PostgreSQL Support
      • Security Best Practices for PostgreSQL
    • Case Studies
      • Performance Tuning
        • BenchPrep
        • tastyworks
      • Distributed Clusters
        • ClickUp
        • European Space Agency (ESA)
        • Telefónica del Sur
        • Animal Logic
      • Database Administration
        • Agilis Systems
      • Professional Training
        • Met Office
        • London & Partners
      • Database Upgrades
        • Alfred Wegener Institute (AWI)
      • Database Migration
        • International Game Technology (IGT)
        • Healthcare Software Solutions (HSS)
        • Navionics
  • Postgres Learning Center
    • Webinars
      • Upcoming Webinars
      • Webinar Library
    • Whitepapers
      • Business Case for PostgreSQL Support
      • Security Best Practices for PostgreSQL
    • Blog
    • Training
      • Course Catalogue
    • Case Studies
      • Performance Tuning
        • BenchPrep
        • tastyworks
      • Distributed Clusters
        • ClickUp
        • European Space Agency (ESA)
        • Telefónica del Sur
        • Animal Logic
      • Database Administration
        • Agilis Systems
      • Professional Training
        • Met Office
        • London & Partners
      • Database Upgrades
        • Alfred Wegener Institute (AWI)
      • Database Migration
        • International Game Technology (IGT)
        • Healthcare Software Solutions (HSS)
        • Navionics
    • Books
      • PostgreSQL 11 Administration Cookbook
      • PostgreSQL 10 Administration Cookbook
      • PostgreSQL High Availability Cookbook – 2nd Edition
      • PostgreSQL 9 Administration Cookbook – 3rd Edition
      • PostgreSQL Server Programming Cookbook – 2nd Edition
      • PostgreSQL 9 Cookbook – Chinese Edition
    • Videos
    • Events
    • PostgreSQL
      • PostgreSQL – History
      • Who uses PostgreSQL?
      • PostgreSQL FAQ
      • PostgreSQL vs MySQL
      • The Business Case for PostgreSQL
      • Security Information
      • Documentation
  • About Us
    • About 2ndQuadrant
    • 2ndQuadrant’s Passion for PostgreSQL
    • News
    • Careers
    • Team Profile
  • Blog
  • Menu Menu
You are here: Home1 / Products2 / pglogical3 / Installation Instructions for pglogical

Installation Instructions for pglogical

pglogical is available as RPMs via yum for CentOS, & RHEL, and as DEBs via apt for Debian and Ubuntu. Please see below for instructions on installing from source.

YUM Repository for pglogical

The instructions below are valid for Red Hat family of operating systems (RHEL, CentOS).

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 RHEL. If you don’t have PostgreSQL already:

  • Install the appropriate PGDG repo rpm from http://yum.postgresql.org/repopackages.php
  • Install PostgreSQL
    • v9.4: yum install postgresql94-server postgresql94-contrib
    • v9.5: yum install postgresql95-server postgresql95-contrib
    • v9.6: yum install postgresql96-server postgresql96-contrib
    • v10: yum install postgresql10-server postgresql10-contrib
    • v11: yum install postgresql11-server postgresql11-contrib
    • v12: yum install postgresql12-server postgresql12-contrib
    • v13: yum install postgresql13-server postgresql13-contrib

Installing pglogical

You can install the “2ndQuadrant’s General Public” repository for your PostgreSQL version, by running the following instructions as root on the destination Linux server:

curl https://access.2ndquadrant.com/api/repository/dl/default/release/9.4/rpm | bash
curl https://access.2ndquadrant.com/api/repository/dl/default/release/9.5/rpm | bash
curl https://access.2ndquadrant.com/api/repository/dl/default/release/9.6/rpm | bash
curl https://access.2ndquadrant.com/api/repository/dl/default/release/10/rpm | bash
curl https://access.2ndquadrant.com/api/repository/dl/default/release/11/rpm | bash
curl https://access.2ndquadrant.com/api/repository/dl/default/release/12/rpm | bash

curl https://access.2ndquadrant.com/api/repository/dl/default/release/13/rpm | bash

Once the repository is installed, you can proceed to pglogical for your PostgreSQL version:

  • PostgreSQL 9.4: yum install postgresql94-pglogical
  • PostgreSQL 9.5: yum install postgresql95-pglogical
  • PostgreSQL 9.6: yum install postgresql96-pglogical
  • PostgreSQL 10: yum install postgresql10-pglogical
  • PostgreSQL 11: yum install postgresql11-pglogical
  • PostgreSQL 12: yum install postgresql12-pglogical
  • PostgreSQL 13: yum install postgresql13-pglogical

Package Signing 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 <[email protected]>" 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.)

APT Repository for pglogical

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://access.2ndquadrant.com/api/repository/dl/default/release/deb | bash

  • Add the http://apt.postgresql.org/ repository. See the site for instructions.

Installing pglogical

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-pglogical
  • PostgreSQL 9.5: sudo apt-get install postgresql-9.5-pglogical
  • PostgreSQL 9.6: sudo apt-get install postgresql-9.6-pglogical
  • PostgreSQL 10: sudo apt-get install postgresql-10-pglogical
  • PostgreSQL 11: sudo apt-get install postgresql-11-pglogical
  • PostgreSQL 12: sudo apt-get install postgresql-12-pglogical
  • PostgreSQL 13: sudo apt-get install postgresql-13-pglogical

Installing 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 USE_PGXS=1 to compile, and make USE_PGXS=1 install to install. You might need to use sudo for the install step. e.g. for a typical RHEL 7 install, assuming you’re using the yum.postgresql.org packages for PostgreSQL:

sudo dnf install postgresql96-devel ; sudo PATH=/usr/pgsql-9.6/bin:$PATH make USE_PGXS=1 clean all ; sudo PATH=/usr/pgsql-9.6/bin:$PATH make USE_PGXS=1 install

Important

Note that you must install pglogical on all servers that will act as publishers or subscribers. So if you’re replicating from 9.4 to 9.5 you’d install postgresql94-pglogical on the 9.4 server and postgresql95-pglogical on the 9.5 server.

For more information, please read the pglogical README.md in /usr/share/doc/postgresql-pglogical/README.md where would be 94,95,96,10,11, 12, 13

Support & Services

24/7 Production Support

Developer Support

Remote DBA for PostgreSQL

PostgreSQL Database Monitoring

PostgreSQL Health Check

PostgreSQL Performance Tuning

Database Security Audit

Upgrade PostgreSQL

PostgreSQL Migration Assessment

Migrate from Oracle to PostgreSQL

Products

HA Postgres Clusters

Postgres-BDR®

2ndQPostgres

pglogical

repmgr

Barman

Postgres Cloud Manager

SQL Firewall

Postgres-XL

OmniDB

Postgres Installer

2UDA

Postgres Learning Center

Introducing Postgres

Blog

Webinars

Books

Videos

Training

Case Studies

Events

About Us

About 2ndQuadrant

What does 2ndQuadrant Mean?

News

Careers 

Team Profile

© 2ndQuadrant Ltd. All rights reserved. | Privacy Policy
  • Twitter
  • LinkedIn
  • Facebook
  • Youtube
  • Mail
Scroll to top
×