Created
December 23, 2014 22:30
-
-
Save mxey/abbb58b0feeca062a34e to your computer and use it in GitHub Desktop.
Upgrade PostgreSQL data directory on OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
mv /usr/local/var/postgres/ /usr/local/var/postgres.old | |
initdb /usr/local/var/postgres/ | |
pg_upgrade -b /usr/local/Cellar/postgresql/9.3.5_1/bin/ -B /usr/local/Cellar/postgresql/9.4.0/bin/ -d /usr/local/var/postgres.old/ -D /usr/local/var/postgres/ | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
psql postgres -c '' | |
rm -r /usr/local/var/postgres.old |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment