patternsqlMinor
Postgres database level encryption
Viewed 0 times
databaselevelencryptionpostgres
Problem
I want to have the whole database to be encrypted, instead of encrypting the data before storing into database.
Is it possible to encrypt the whole postgres database and what best method to use?
Thanks :)
Is it possible to encrypt the whole postgres database and what best method to use?
Thanks :)
Solution
PostgreSQL doesn't currently support DB-level encryption. (Correct as of 9.4, at least).
You can use an encrypted file system, though the performance impact can be pretty serious for write-heavy systems, especially those doing random I/O. Your options depend on the operating system - Microsoft BitLocker, Linux's dm-crypt/LUKS/cryptsetup, OS X's FileVault 2, etc.
Alternately, look at PgCrypto for field-level encryption, but beware of key-disclosure issues in logging and
See also:
You can use an encrypted file system, though the performance impact can be pretty serious for write-heavy systems, especially those doing random I/O. Your options depend on the operating system - Microsoft BitLocker, Linux's dm-crypt/LUKS/cryptsetup, OS X's FileVault 2, etc.
Alternately, look at PgCrypto for field-level encryption, but beware of key-disclosure issues in logging and
pg_stat_activity.See also:
- Secure postgresql database encryption
- How to use aes-encryption in PostgreSQL?
- https://stackoverflow.com/q/12614523/398670
- https://stackoverflow.com/q/21095026/398670
- https://stackoverflow.com/q/8054503/398670
Context
StackExchange Database Administrators Q#64132, answer score: 8
Revisions (0)
No revisions yet.