Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dfang/0807a205ddc2a10b88aecd1b7e0707ff to your computer and use it in GitHub Desktop.
Save dfang/0807a205ddc2a10b88aecd1b7e0707ff to your computer and use it in GitHub Desktop.
Upgrades Homebrew Postgres installation from 9.5 to 9.6
brew services stop postgresql
initdb /usr/local/var/postgres9.6 -E utf8
pg_upgrade -d /usr/local/var/postgres -D /usr/local/var/postgres9.6 -b /usr/local/Cellar/postgresql/9.5.5/bin -B /usr/local/Cellar/postgresql/9.6.1/bin -v
mv /usr/local/var/postgres /usr/local/var/postgres9.5
mv /usr/local/var/postgres9.6 /usr/local/var/postgres
brew services start postgresql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment