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
I had the same problem on Mac Serria. In Mac Serria you can find postmaster.pid inside /Users//Library/Application Support/Postgres/var-9.6 if you used GUI installer rather than homebrew.
/Users//Library/Application Support/Postgres/var-9.6
Once you delete this file then everything should work fine.