I just upgraded my MacMini Server from Lion Server to Mountain Lion using OS X Server. I am having the same problem with PostgreSQL that I did last year when I first instal
I had this problem with Django.
Fix it by explicitly setting your hostname to "localhost".