I\'m getting a common Mac OSX error for Homebrew installations of Postgres,
No such file or directory
Is the server running locally and accepting
connections on
A simpler solution is to locate where the socket actually is vs where it's expected to be. In my case, I ran:
$ locate PGSQL.5432
/private/var/pgsql_socket/.s.PGSQL.5432
/private/var/pgsql_socket/.s.PGSQL.5432.lock
Then just symlink the expected socket location to the actual socket location.
$ ln -s /private/var/pgsql_socket/.s.PGSQL.5432 /tmp/.s.PGSQL.5432