Skip to content

Instantly share code, notes, and snippets.

@mariusbutuc
Forked from joho/gist:3735740
Last active August 29, 2015 14:17
Show Gist options
  • Save mariusbutuc/614c77b47ac4407a6f98 to your computer and use it in GitHub Desktop.
Save mariusbutuc/614c77b47ac4407a6f98 to your computer and use it in GitHub Desktop.
PostgreSQL 9.3 to 9.4.1 upgrade steps
# Steps to install and run PostgreSQL 9.4.1 using Homebrew (Mac OS X)
# (if you aren't using version 9.3, change line #9 with the correct version)
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
mv /usr/local/var/postgres /usr/local/var/postgres93
brew update
brew upgrade postgresql
initdb /usr/local/var/postgres -E utf8
pg_upgrade -b /usr/local/Cellar/postgresql/9.3/bin -B /usr/local/Cellar/postgresql/9.4.1/bin -d /usr/local/var/postgres93 -D /usr/local/var/postgres
cp /usr/local/Cellar/postgresql/9.4.1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
# If you're using ruby, also:
gem pristine pg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment