Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The default configuration in /var/pgsql/postgresql.conf says that listen_addresses defaults to localhost, but it doesn't let me connect over port 5432. Connecting (as root, using sudo) over a Unix domain socket works fine, but I need to enable network connections.

I tried uncommenting the listen_addresses = 'localhost' line (to make it explicit), and restarting the Postgres process (with sudo serveradmin stop postgres, sudo serveradmin start postgres), but that didn't help.

share|improve this question
up vote 1 down vote accepted

The Postgres process started by "serveradmin" has command-line arguments added by /System/Library/LaunchDaemons/org.postgresql.postgres.plist. The default includes -c listen_addresses=, which turns off TCP/IP.

Changing it to listen_addresses=localhost, and restarting Postgres, solved the problem. (I suppose I could probably also remove the -c argument entirely.)

(One comment I found somewhere suggested that in 10.8 Server, the file you need to edit is /Library/Server/PostgreSQL/Config/org.postgresql.postgres.plist, but I haven't upgraded to 10.8 yet so I can't confirm this.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.