At this point, you should know how to secure a PostgreSQL installation. There is one more important point that I need to mention. All the security mechanisms provided by PostgreSQL rely on a secure operating environment. If a nefarious user manages to gain superuser access to your system, he or she can bypass all the security measures that you have put into place. Worse yet, he or she can unravel your security in such a way that others can gain access to your private data. PostgreSQL security is not a substitute for a secure operating system.