error message
psql -d postgres
psql: 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"?
$ psql -V psql (PostgreSQL) 11.4
$ brew services restart postgresql
自分はこれで治った。これでもダメな場合は以下のファイルを削除すると良い模様
$ rm /usr/local/var/postgrespostmaster.pid