Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dhirajbajaj/9600e26c4ba21945ee8f to your computer and use it in GitHub Desktop.
Save dhirajbajaj/9600e26c4ba21945ee8f to your computer and use it in GitHub Desktop.
# postgres upgrading from 9.3 to 9.4
brew switch postgres 9.3 # presuming you already installed 9.4.4
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.4
initdb -D /usr/local/var/postgres
psql -d postgres -f outputfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment