Fix Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
Most likely it's because your system shutdown unexpectedly Try
postgres -D /opt/homebrew/var/postgres # for Intel M1
postgres -D /usr/local/var/postgres # for Silicon
You might see
FATAL: lock file "postmaster.pid" already exists
HINT: Is another ...
blog.victor-abz.com1 min read