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
First remove the installed postgres:
sudo apt-get purge postgr* sudo apt-get autoremove
Then install 'synaptic':
sudo apt-get install synaptic sudo apt-get update
Then install Postgres
sudo apt-get install postgresql postgresql-contrib