I've just got a new Macbook, and installed it from a backup of my old one.
Now, Homebrew thinks that Postgres is running:
% brew services restart postgresql
Stopping `postgresql`... (might take a while)
==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)
But I can't connect to any of my databases:
% psql
psql: error: 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"?
And postgres isn't showing up in the list of running processes:
% ps -ef | grep postgres
501 88781 87701 0 5:34pm ttys000 0:00.00 grep postgres
What should I do? I've looked for postmaster.pid
in /usr/local/var/postgres/
- it isn't there.