Created
December 22, 2012 02:10
-
-
Save raecoo/4357051 to your computer and use it in GitHub Desktop.
Upgrade Postgres 9.1 to 9.2
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
cd /usr/local/var | |
mkdir postgres9.2 | |
# Initialize a the new postgres 9.2 database | |
initdb /usr/local/var/postgres9.2 | |
# Tell postgres we are upgrading the existing postgres database to the new postgres9.2 location | |
pg_upgrade -d /usr/local/var/postgres/ -D /usr/local/var/postgres9.2 -b /usr/local/Cellar/postgresql/9.1.4/bin/ -B /usr/local/Cellar/postgresql/9.2.1/bin/ -v | |
# Swap the folders | |
mv postgres postgres9.1.4 | |
mv postgres9.2 postgres | |
# Remove this unnecessary helper file | |
rm delete_old_cluster.sh | |
# Restart postgres | |
launchctl unload -w homebrew.mxcl.postgresql.plist | |
launchctl load -w homebrew.mxcl.postgresql.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.1.4, which is not compatible with this version 9.2.1.