Following advice of Psql: could not connect...:
Running the following command resets PostgreSQL's transaction log, which resolves the problem.
pg_resetxlog -f /usr/local/Cellar/postgresql/9.3.1/data
you should replace /usr/local/Cellar/postgresql/9.3.1/data
with your own pg_datadir (eg., pg_ctl -D $DATADIR start
)