Skip to content

Instantly share code, notes, and snippets.

@ssaunier
Created February 7, 2015 10:11
Show Gist options
  • Save ssaunier/0b98da25e56f06f18e8b to your computer and use it in GitHub Desktop.
Save ssaunier/0b98da25e56f06f18e8b to your computer and use it in GitHub Desktop.
Postgresql - Upgrade from 9.3 to 9.4 on Mac OSX with HomeBrew
pkill -f rails
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
brew update
brew upgrade postgresql
initdb /usr/local/var/postgres9.4 -E utf8
pg_upgrade -v \
-d /usr/local/var/postgres \
-D /usr/local/var/postgres9.4 \
-b /usr/local/Cellar/postgresql/9.3.5_1/bin/ \
-B /usr/local/Cellar/postgresql/9.4.1/bin/
cd /usr/local/var
mv postgres postgres9.3
mv postgres9.4 postgres
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@ssaunier
Copy link
Author

ssaunier commented Feb 9, 2015

@Papillard, @tchret, les paths de pg_upgrade seront peux-etre legerement differents chez vous, n'hésitez pas à faire un :

ls -lh /usr/local/Cella/postgresql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment