Install pg_tde on Debian or Ubuntu¶
The packages for the tech preview pg_tde are available in the experimental repository for Percona Distribution for PostgreSQL 17.
Check the list of supported platforms.
This tutorial shows how to install pg_tde with Percona Distribution for PostgreSQL.
Preconditions¶
- Debian and other systems that use the
aptpackage manager include the upstream PostgreSQL server package (postgresql-17.2) by default. You need to uninstall this package before you install Percona Server for PostgreSQL andpg_tdeto avoid conflicts. - You need the
percona-releaserepository management tool that enables the desired Percona repository for you.
Install percona-release¶
-
You need the following dependencies to install
percona-release:wgetgnupg2curllsb-release
Install them with the following command:
sudo apt-get install -y wget gnupg2 curl lsb-release -
Fetch the
percona-releasepackagesudo wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb -
Install
percona-releasesudo dpkg -i percona-release_latest.generic_all.deb -
Enable the Percona Distribution for PostgreSQL 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 enable ppg-17.2 -
Update the local cache
sudo apt-get update
Install pg_tde¶
Important
The pg_tde Beta extension is a part of the percona-postgresql-17 package. If you installed a previous version of pg_tde from the percona-postgresql-17-pg-tde package, do the following:
- Drop the extension using the
DROP EXTENSIONwithCASCADEcommand.
Warning: The use of the CASCADE parameter deletes all tables that were created in the database with pg_tde enabled and also all dependencies upon the encrypted table (e.g. foreign keys in a non-encrypted table used in the encrypted one).
DROP EXTENSION pg_tde CASCADE
- Uninstall the
percona-postgresql-17-pg-tdepackage.
After all preconditions are met, run the following command to install pg_tde:
sudo apt-get install -y percona-postgresql-17