Limitations of pg_tde
This is the Percona pg_tde 2.3.0 manual. For the paired build, backup tools and major upgrades, see PG TDE on Mimus.
Known incompatibilities in Percona Server for PostgreSQL
Some PostgreSQL extensions may not work with Percona Server for PostgreSQL due to internal changes required by pg_tde.
These incompatibilities may occur even if pg_tde is not installed or enabled.
Distributed and extension-based systems
Percona Server for PostgreSQL is not compatible with distributed PostgreSQL extensions such as Citus or time-series extensions such as TimescaleDB.
This limitation is caused by internal PostgreSQL changes related to pg_tde and is not dependent on enabling the extension.
Limitations when using pg_tde
Limitations of pg_tde 2.3.0:
- PostgreSQL’s internal system tables, which include statistics and metadata, are not encrypted.
- Temporary files created when queries exceed
work_memare not encrypted. These files may persist during long-running queries or after a server crash which can expose sensitive data in plaintext on disk.
Recovery without pg_tde in shared_preload_libraries
When recovering a PostgreSQL cluster that contains encrypted tables, the pg_tde extension must be loaded through the shared_preload_libraries configuration parameter.
ALTER DATABASE ... SET TABLESPACE
pg_tdeThe ALTER DATABASE ... SET TABLESPACE command bypasses PostgreSQL’s storage manager (SMGR), which pg_tde relies on to enforce encryption.
- If encrypted objects exist in the database’s default tablespace, the operation is refused.
- If no encrypted objects are present in the default tablespace, the operation is allowed.
Only objects in the default tablespace are checked. Objects in other tablespaces are not evaluated by pg_tde.
To move encrypted tables individually, use ALTER TABLE ... SET TABLESPACE, which operates through SMGR and is compatible with pg_tde.
Currently unsupported WAL tools
The following tools are currently unsupported with pg_tde WAL encryption:
pg_createsubscriberpg_receivewalBarmanpg_verifybackupby default fails with checksum or WAL key size mismatch errors. As a workaround, use-s(skip checksum) and-n(--no-parse-wal) to verify backups.- pgBackRest without
pg_tde_archive_decryptandpg_tde_restore_encrypt, or witharchive-async,archive-header-check, orchecksum-pageenabled.
Supported WAL tools
The following tools have been tested and verified by Percona to work with pg_tde WAL encryption:
- Patroni, for an example configuration see the following Patroni configuration file
pg_tde_basebackup(with--wal-method=streamor--wal-method=none), for details on usingpg_tde_basebackupwith WAL encryption, see Backup with WAL encryption enabledpg_tde_resetwalpg_tde_rewindpg_tde_upgradepg_tde_waldump- pgBackRest, when
pg_tde_archive_decryptandpg_tde_restore_encryptare configured andarchive-async,archive-header-check, andchecksum-pageare disabled
Example Patroni configuration
The following is a Percona-tested example configuration.
Click to expand the Percona-tested Patroni configuration
The above example is Percona-tested, but Patroni versions differ, especially with discovery backends such as etcd. Ensure you adjust the configuration to match your environment, version, and security requirements.
Next steps
Check which PostgreSQL versions and deployment types are compatible with pg_tde before planning your installation.
View the versions and supported deployments
Begin the installation process when you’re ready to set up encryption.