---#==============================================================## File : pgtde.yml# Desc : PG TDE with Percona PostgreSQL 1-node template# Ctime : 2025-07-04# Mtime : 2026-07-23# Docs : https://pigsty.io/docs/conf/pgtde# License : Apache-2.0 @ https://pigsty.io/docs/about/license/# Copyright : 2018-2026 Ruohang Feng / Vonng (rh@vonng.com)#==============================================================## This is the config template for Percona PostgreSQL Distribution# with pg_tde, currently based on PostgreSQL 18# tutorial: https://pigsty.io/docs/pgsql/kernel/percona## Usage:# curl https://repo.pigsty.io/get | bash# ./configure -c pgtde# ./deploy.ymlall:children:infra:{hosts:{10.10.10.10:{infra_seq:1 }} ,vars:{repo_enabled:false}}etcd:{hosts:{10.10.10.10:{etcd_seq:1 }} ,vars:{etcd_cluster:etcd }}#minio: { hosts: { 10.10.10.10: { minio_seq: 1 }} ,vars: { minio_cluster: minio }}#----------------------------------------------## Percona Postgres Database Cluster#----------------------------------------------#pg-meta:hosts:10.10.10.10:{pg_seq:1, pg_role:primary }vars:pg_mode:pgtdepg_cluster:pg-metapg_users:- {name:dbuser_meta ,password:DBUser.Meta ,pgbouncer:true ,roles:[dbrole_admin ] ,comment:pigsty admin user }- {name:dbuser_view ,password:DBUser.Viewer ,pgbouncer:true ,roles:[dbrole_readonly] ,comment:read-only viewer }pg_databases:- name:metabaseline:cmdb.sqlcomment:pigsty tde databaseschemas:[pigsty]extensions:[vector, postgis, pg_tde ,pgaudit, { name: pg_stat_monitor, schema: monitor } ]pg_hba_rules:# https://pigsty.io/docs/pgsql/config/hba- {user:all ,db:all ,addr:intra ,auth:pwd ,title:'everyone intranet access with password' ,order:800}pg_crontab:# https://pigsty.io/docs/pgsql/admin/crontab- '00 01 * * * /pg/bin/pg-backup full'# Percona PostgreSQL TDE Kernel Settingspg_packages:[pgtde, pgsql-common ] # install Pigsty private-prefix Percona packagespg_libs:'pg_tde, pgaudit, pg_stat_statements, pg_stat_monitor, auto_explain'vars:#----------------------------------------------## INFRA : https://pigsty.io/docs/infra/param#----------------------------------------------#version:v4.5.0 # pigsty version stringadmin_ip:10.10.10.10# admin node ip addressregion:default # upstream mirror region: default,china,europeinfra_portal:# infra services exposed via portalhome :{domain:i.pigsty } # default domain name#----------------------------------------------## NODE : https://pigsty.io/docs/node/param#----------------------------------------------#nodename_overwrite:false# do not overwrite node hostname on single node modenode_repo_modules:node,infra,pgsqlnode_tune:oltp#----------------------------------------------## PGSQL : https://pigsty.io/docs/pgsql/param#----------------------------------------------#pg_version:18# Default Percona TDE PG Major Version is 18pg_conf:oltp.yml # pgsql tuning specs: {oltp,olap,tiny,crit}.yml#----------------------------------------------## PASSWORD : https://pigsty.io/docs/setup/security/#----------------------------------------------#grafana_admin_password:pigstygrafana_view_password:DBUser.Viewerpg_admin_password:DBUser.DBApg_monitor_password:DBUser.Monitorpg_replication_password:DBUser.Replicatorpatroni_password:Patroni.APIhaproxy_admin_password:pigstyminio_secret_key:S3User.MinIOetcd_root_password:Etcd.Root...
Explanation
The pgtde template selects pg_mode: pgtde and installs the pgtde package
alias. Pigsty links the private /usr/pgtde-$v prefix (currently
/usr/pgtde-18) to its stable /usr/pgsql entry point.
Key Features:
Transparent Data Encryption: The kernel automatically encrypts data on disk. Applications do not need to manage this encryption.
Key Management: Supports local keys and external Key Management Systems (KMS)