Last Updated: February 25, 2016
· jasontorres

How to upgrade to Postgres 9.4 from 9.3 with Homebrew

brew switch postgres 9.3.5    # presuming you already installed 9.4.1
pg_dumpall > outputfile
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
mv /usr/local/var/postgres /usr/local/var/postgres.old
brew switch postgres 9.4.1
initdb -D /usr/local/var/postgres
psql -d postgres -f outputfile

Reposted to save you from reading through the entire issue :p