Recently I started to move from MySQL to PostgreSQL.
When I had it set up on windows, I enabled ssl and everything worked like a charm.
My pg_hba.conf looks like this:
hostssl ticketsystem ticketsystem127.0.0.1/32md5
hostsslfaq faq 127.0.0.1/32 md5
hostssl allpostgres::1/128 md5
hostssl ticketsystemticketsystem::1/128md5
hostssl faq faq ::1/128 md5