If removing postmaster.pid
does not resolve the issue, this worked for me:
cd /usr/local/var/
rm -rf postgres/
mkdir postgres
initdb --locale=C -E UTF-8 postgres/
brew services restart postgresql
Credit to @spirito_libero 's solution on this thread.