I have noticed that although the listening host in postgresql.conf is localhost connecting to a database via psql fails unless the host is changed 127.0.0.1. I have also noticed MySQL display the same trait on occasion.
Is there some difference between 127.0.0.1 and localhost which causes the database connections to be treated differently?