I just fixed it on my mac. I used homebrew to install postgres. These are the steps that I took to get up and run again.
First check the status of the postgresql service:
pg_ctl -D /usr/local/var/postgres status
if you see this pg_ctl: no server running , unload the launch agent:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
then move the existing postgres data (moving, not deleting - cheap insurance):
mv /usr/local/var/postgres /usr/local/var/postgres-deletemewhenitsallgood
then initialize your postgres database:
initdb /usr/local/var/postgres -E utf8
then load the launch agent:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
OR run it:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Now check the status again:
pg_ctl -D /usr/local/var/postgres status
If you see something like this, you are good to go.
pg_ctl: server is running (PID: 61295) /usr/local/Cellar/postgresql/bin/postgres "-D" "/usr/local/var/postgres"
Then you can enter your postgres database:
psql -d postgres
source share