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
# adjust path accordingly to your install, e.g. `/opt/homebrew/var/postgres/postmaster.pid`
$ rm /usr/local/var/postgres/postmaster.pid 
$ brew services start postgresql