Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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 :)

share|improve this question
    
What about using an encrypted filesystem? –  a_horse_with_no_name Apr 29 '14 at 8:28

1 Answer 1

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 pg_stat_activity.

See also:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.