> psql psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
In Console.app I was seeing:
com.apple.launch.peruser.501: (homebrew.mxcl.postgresql) Exited with code: 1
Not much info there on why it was happening.
I found the answer in
tail /usr/local/var/postgres/server.log FATAL: lock file "postmaster.pid" already exists HINT: Is another postmaster (PID 322) running in data directory "/usr/local/var/postgres"?
There was no postgres running:
lunchy status 11:55 ivan -1 homebrew.mxcl.postgresql ps auxwww | grep postgres grep postgres
So, the hint was misleading. The solution was just to delete the process
ID file (.pid)
Then launchd started up postgres automatically. I confirmend this with
tail -f server.log