pg_vault_tde
pg_vault_tde : Transparent Data Encryption for PostgreSQL through custom table and index access methods
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 7510 | pg_vault_tde | pg_vault_tde | 1.7.2 |
SEC | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-- | Yes | Yes | Yes | Yes | no | no |
| Relationships | |
|---|---|
| See Also | pg_tde supabase_vault pgsodium column_encrypt pgcryptokey pgcrypto |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.7.2 |
18 17 16 15 14 | pg_vault_tde |
- |
| RPM | PIGSTY | 1.7.2 |
18 17 16 15 14 | pg_vault_tde_$v |
openssl-libs, libcurl |
| DEB | PIGSTY | 1.7.2 |
18 17 16 15 14 | postgresql-$v-pg-vault-tde |
`libssl3 |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | N/A | N/A | N/A | N/A |
| el8.aarch64 | N/A | N/A | N/A | N/A | N/A |
| el9.x86_64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| el9.aarch64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| el10.x86_64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| el10.aarch64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| d12.x86_64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| d12.aarch64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| d13.x86_64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| d13.aarch64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| u22.x86_64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| u22.aarch64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| u24.x86_64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| u24.aarch64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| u26.x86_64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
| u26.aarch64 | PIGSTY 1.7.2 | PIGSTY 1.7.2 | N/A | N/A | N/A |
Source
github.com/labmiriade/pg_vault_tde
pg_vault_tde-1.7.2.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
Sources:
pg_vault_tde distribution 1.7.2 encrypts table values with AES-256-GCM through encrypted_heap, using Vault/OpenBao, a local PKCS#12 wallet or PKCS#11. SQL/control version remains 1.7. PostgreSQL 17–18, OpenSSL 3 and libcurl are required. Configure the key provider and authentication, preload the library, and restart before creating it as a superuser.
Core Workflow
Operational Boundaries
This example assumes a configured provider. pg_vault_tde_health_check, pg_vault_tde_verify_integrity, pg_vault_tde_get_rotation_status and encrypted-size helpers expose operational state. tde_btree supports encrypted equality lookup, not ordering/range or index-only scans. Numeric and nondeterministic-collation encrypted indexes are unsupported; audit old unique/exclusion constraints because their checks may be ineffective. Plain indexes can expose keys, and pg_dump/COPY produce decrypted output. Protect external wallets/KMS and use the matching encrypted-backup tools where supported. Tuple headers, statistics, logs and query results are outside this protection.
Before replacing an older library or restarting, follow the upstream recovery checklist: earlier rotated tables may depend on keys held only in memory; concurrent rotation may require copying data while still readable, and rotated out-of-line values need the specified rewrite. Version 1.7.0 TOAST upgrades also have a separate export requirement. Check rotated/partial indexes and wallet ownership. After upgrading to 1.7.2, every pre-existing encrypted table needs VACUUM FULL to migrate its tuple layout; reserve a maintenance window and extra disk space. When pg_vault_tde.toast_custom_rmgr is enabled, the WAL ID changes from 128 to 161: clean shutdown, coordinated primary/standby upgrade, slot drainage and a new base backup are required. There is no rolling upgrade across those WAL formats.
Run key-management operations one at a time. Table rotation keeps reads available but blocks writes for one transaction; logical slots must decode the rotation before a restart or another rotation. Version 1.7.2 tightens caller privileges, but upstream documents remaining SECURITY DEFINER wrapper limitations; follow the listed grants/revokes. Do not toggle pg_vault_tde.enabled on a populated encrypted table. These catalog updates do not perform an operational upgrade or change the Pigsty package baseline.