Install Percona Distribution for PostgreSQL on Debian and Ubuntu¶
This document describes how to install Percona Server for PostgreSQL from Percona repositories on DEB-based distributions such as Debian and Ubuntu. Read more about Percona repositories.
Preconditions¶
- Debian and other systems that use the apt package manager include the upstream PostgreSQL server package (postgresql-15) by default. The components of Percona Distribution for PostgreSQL 15 can only be installed together with the PostgreSQL server shipped by Percona (percona-postgresql-15). If you wish to use Percona Distribution for PostgreSQL, uninstall the PostgreSQL package provided by your distribution (postgresql-15) and then install the chosen components from Percona Distribution for PostgreSQL.
- Install
curlfor Telemetry. We use it to better understand the use of our products and improve them.
Procedure¶
Run all the commands in the following sections as root or using the sudo command:
Configure Percona repository¶
-
Install the
percona-releaserepository management tool to subscribe to Percona repositories:-
Fetch
percona-releasepackages from Percona web:$ wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb -
Install the downloaded package with
dpkg:$ sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb -
Refresh the local cache:
$ sudo apt update
-
-
Enable the repository
Percona provides two repositories for Percona Distribution for PostgreSQL. We recommend enabling the Major release repository to timely receive the latest updates.
$ sudo percona-release setup ppg-15
Install packages¶
The meta package enables you to install several components of the distribution in one go.
$ sudo apt install percona-ppg-server-15
Run the following commands:
-
Install the PostgreSQL server package:
$ sudo apt install percona-postgresql-15 -
Install the components:
Install
pg_repack:$ sudo apt install percona-postgresql-15-repackInstall
pgAudit:$ sudo apt install percona-postgresql-15-pgauditInstall
pgBackRest:$ sudo apt install percona-pgbackrestInstall
Patroni:$ sudo apt install percona-patroniInstall
pgBouncer:$ sudo apt install percona-pgbouncerInstall
pgAudit-set_user:$ sudo apt install percona-pgaudit15-set-userInstall
pgBadger:$ sudo apt install percona-pgbadgerInstall
wal2json:$ sudo apt install percona-postgresql-15-wal2jsonInstall PostgreSQL contrib extensions:
$ sudo apt install percona-postgresql-contribInstall HAProxy
$ sudo apt install percona-haproxyInstall pgpool2
$ sudo apt install percona-pgpool2Install
pg_gather$ sudo apt install percona-pg-gatherInstall
pgvector$ sudo apt install percona-postgresql-15-pgvectorSome extensions require additional setup in order to use them with Percona Distribution for PostgreSQL. For more information, refer to Enabling extensions.
Start the service¶
The installation process automatically initializes and starts the default database. You can check the database status using the following command:
$ sudo systemctl status postgresql.service
Congratulations! Your Percona Distribution for PostgreSQL is up and running.