I'm running macOS Monterey version 12.2.
After restarting my laptop I can no longer connect to my postgresql server. and am getting this error:
(base) user@user Application Support % brew services restart postgresql
Stopping `postgresql`... (might take a while)
==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)
(base) user@user Application Support % psql postgres
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I found may suggestions online such as here to remove postmaster.pid
. I could not find postmaster.pid
in the suggested path (/usr/local/var/postgres/postmaster.pid
) however I did find a postmaster.pid
under /usr/local/var/postgres.backup/postmaster.pid
which I then removed. but I am still getting the same error.
Can anyone help me with this? And can anyone help clarify why I had no /usr/local/var/postgres/postmaster.pid
but did have a /usr/local/var/postgres.backup/postmaster.pid
?