Installing Percona Distribution for PostgreSQL

Using repositories provided by Percona is the recommended way of installing Percona Distribution for PostgreSQL.

There are two repositories available for Percona Distribution for PostgreSQL. We recommend to install Percona Distribution for PostgreSQL from the Major Release repository (e.g. ppg-11) as it includes the latest version packages. Whenever a package is updated, the package manager of your operating system detects that and prompts you to update. As long as you update all Distribution packages at the same time, you can ensure that the packages you’re using have been tested and verified by Percona.

The Minor Release repository includes a particular minor release of the database and all of the packages that were tested and verified to work with that minor release (e.g. ppg-11.8). You may choose to install Percona Distribution for PostgreSQL from the Minor Release repository if you have decided to standardize on a particular release which has passed rigorous testing procedures and which has been verified to work with your applications. This allows you to deploy to a new host and ensure that you’ll be using the same version of all the Distribution packages, even if newer releases exist in other repositories.

The disadvantage of using a Minor Release repository is that you are locked in this particular release. When potentially critical fixes are released in a later minor version of the database, you will not be prompted for an upgrade by the package manager of your operating system. You would need to change the configured repository in order to install the upgrade.


Like many other Percona products, Percona Distribution for PostgreSQL is installed from Percona repositories by using the percona-release utility.

Important

Before you attempt to install Percona Distribution for PostgreSQL, update percona-release to its latest version. See the documentation of percona-release for details.

As soon as percona-release is up-to-date, set up the Percona Distribution for PostgreSQL product (``ppg-11`).

$ sudo percona-release setup ppg-11

Hint

The command to set up a minor version product is the following:

$ sudo percona-release setup ppg-11.8

Install Percona Distribution for PostgreSQL using the commands of your package manager (the procedure differs depending on the package manager of your operating system).

Using the DEB Format

Important

On Debian and other systems that use the apt package manager, such as Ubuntu, components of Percona Distribution for PostgreSQL 11 can only be installed together with the server shipped by Percona (percona-postgresql-11). If you wish to use Percona Distribution for PostgreSQL uninstall the PostgreSQL package provided by your distribution (postgresql-11) and then install the chosen components from Percona Distribution for PostgreSQL.

The following platforms are supported:

  • Debian 9.0 (stretch)
  • Debian 10.0 (buster)
  • Ubuntu 18.04 LTS (bionic)

Platform Specific Notes

On Debian 9 (stretch), you need to enable the llvm repository

Install the percona-postgresql-11 package using apt install.

$ sudo apt install percona-postgresql-11

Note that this package will not install the components. To install these components use the appropriate packages:

$ # To install pg_repack
$ sudo apt-get install percona-postgresql-11-repack
$ # To Install pgaudit
$ sudo apt-get install percona-postgresql-11-pgaudit
$ # To install pgBackRest
$ sudo apt-get install percona-pgbackrest
$ # To install Patroni
$ sudo apt-get install percona-patroni
$ # To install PostgreSQL contrib extensions
$ sudo apt-get install percona-postgresql-contrib

Using the RPM Format

The following platforms are supported:

  • CentOS 7 and Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8

Platform Specific Notes

If you intend to install Percona Distribution for PostgreSQL on Red Hat Enterprise Linux v8, disable the postgresql module:

$ sudo dnf module disable postgresql

On CentOS 7, you should install the epel-release package:

$ sudo yum -y install epel-release
$ sudo yum repolist

Install the percona-postgresql-11 package using yum install.

$ sudo yum install percona-postgresql11-server

Note that this package will not install the components. To install these components use the appropriate packages:

$ # To install pg_repack
$ sudo yum install percona-pg_repack11
$ # To Install pgaudit
$ sudo yum install percona-pgaudit
$ # To install pgBackRest
$ sudo yum install percona-pgbackrest
$ # To install Patroni
$ sudo yum install percona-patroni
$ # To install PostgreSQL contrib extensions
$ sudo yum install percona-postgresql11-contrib

Starting the service

Percona Distribution for PostgreSQL is not automatically started after the installation. To start Percona Distribution for PostgreSQL, initialize the cluster using the following command:

/usr/pgsql-11/bin/postgresql-11-setup initdb

Start the PostgreSQL service:

$ sudo systemctl start postgresql-11