# Encrypting an existing database using pg\_tde

**URL:** <https://forums.percona.com/t/encrypting-an-existing-database-using-pg-tde/39040>\
**Category:** PG\_TDE – Transparent Data Encryption (TDE)\
**Created:** [August 8, 2025, 7:11pm UTC](https://forums.percona.com/t/encrypting-an-existing-database-using-pg-tde/39040 "2025-08-08T19:11:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kashif\_javed](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kashif_javed/32/21743_2.png) [@kashif\_javed](https://forums.percona.com/u/kashif_javed)\
**Post date:** [August 8, 2025, 7:11pm UTC](https://forums.percona.com/t/encrypting-an-existing-database-using-pg-tde/39040/1 "2025-08-08T19:11:46Z")

</div>

I’ve gone through the documentation and understand that pg\_tde allows encryption at the table level .  
However, I have an existing PostgreSQL database (needs to be migrated to Percona Server for PostgreSQL) and would like to clarify:  
Is there a way to encrypt the entire database or existing tables in-place using pg\_tde, or is it required to create new encrypted tables and migrate the data manually?  
Also, are there any plans to support full database-level encryption in future releases?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [August 9, 2025, 5:10pm UTC](https://forums.percona.com/t/encrypting-an-existing-database-using-pg-tde/39040/2 "2025-08-09T17:10:20Z")

</div>

Because of how PGSQL stores data on disk, on a table-by-table basis, it is not possible to encrypt “entire database”.

You don’t need to create new tables, you can [ALTER in place](https://docs.percona.com/pg-tde/test.html#encrypt-existing-table)
