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.
-
Debian and other systems that use the
aptpackage manager include the upstream PostgreSQL server packagepostgresql-{{pgversion}}by default. The components of Percona Distribution for PostgreSQL {{pgversion}} can only be installed together with Percona Server for PostgreSQL (percona-postgresql-{{pgversion}}). If you wish to use Percona Distribution for PostgreSQL, uninstall thepostgresql-{{pgversion}}package provided by your distribution 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. To installcurl, run the following command:$ sudo apt install curl
Run all the commands in the following sections as root or using the sudo command:
-
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-{{pgversion}}
To install the packages individually, run the following commands: {.power-number}
-
Install the PostgreSQL server package:
$ sudo apt install percona-postgresql-{{pgversion}} -
Install the components:
Install
pg_repack:$ sudo apt install percona-postgresql-{{pgversion}}-repackInstall
pgAudit:$ sudo apt install percona-postgresql-{{pgversion}}-pgauditInstall
pgBackRest:$ sudo apt install percona-pgbackrest
Install
Patroni:$ sudo apt install percona-patroni
Install
pg_stat_monitor:octicons-link-external-16:.Install
pgBouncer:$ sudo apt install percona-pgbouncer
Install
pgAudit-set_user:$ sudo apt install percona-pgaudit{{pgversion}}-set-userInstall
pgBadger:$ sudo apt install percona-pgbadger
Install
wal2json:$ sudo apt install percona-postgresql-{{pgversion}}-wal2jsonInstall
PostgreSQL contribextensions:$ sudo apt install percona-postgresql-contrib
Install
HAProxy:$ sudo apt install percona-haproxy
Install
pgpool2:$ sudo apt install percona-pgpool2
Install
pg_gather:$ sudo apt install percona-pg-gather
Install
pgvector:$ sudo apt install percona-postgresql-{{pgversion}}-pgvectorSome extensions require additional setup in order to use them with Percona Distribution for PostgreSQL. For more information, refer to Enabling extensions.
The installation process automatically initializes and starts the default database. You can check the database status using the following command:
$ sudo systemctl status postgresql.serviceCheck the Percona Distribution for PostgreSQL version:
$ psql --version??? example "Sample output"
```{.text .no-copy}
psql (PostgreSQL) {{pspgversion}} (Percona Server for PostgreSQL) {{pspgversion}}
```
Congratulations! Your Percona Distribution for PostgreSQL is up and running.
Enable extensions :material-arrow-right:{.md-button}
Connect to PostgreSQL :material-arrow-right:{.md-button}