Skip to content

Instantly share code, notes, and snippets.

@eostrom
Forked from rafaelss/gist:3700977
Last active December 18, 2015 10:49
Show Gist options
  • Save eostrom/5771076 to your computer and use it in GitHub Desktop.
Save eostrom/5771076 to your computer and use it in GitHub Desktop.
Steps to upgrade from PostgreSQL 9.1.5 to 9.2.4 using Homebrew (Mac OS X)
if you're using `launchd` to manage PostgreSQL
and your superuser is named `postgres`.
1. pg_dumpall -U postgres > postgres-9.1.5-dumpall
2. launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
3. mv /usr/local/var/postgres /usr/local/var/postgres91
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8 -U postgres
6. launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
7. psql -U postgres < ~/postgres-9.1.5-dumpall
YMMV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment