PostgreSQL not running on Mac
The problem can also be attributed to a crashed process that left postmaster.pid
file behind.
$ brew services stop postgresql
$ rm /usr/local/var/postgres/postmaster.pid # adjust path accordingly to your install
$ brew services start postgresql
I was getting the same
Is the server running locally and accepting connections on Unix domain
socket "/tmp/.s.PGSQL.5432"?
loop of Homebrew install / start / stop / restart to no avail...
Finally, brew postgresql-upgrade-database
worked.
Seems I was on 9.6 instead of 10.4, and something my latest App Store restart restarted all my database servers...
The answer is here.
Run this command to manually start the server:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start