Solving the The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.0.
panic ;) This is mainly for Postgres installed via Homebrew, but you can adapt it to your system pretty easily.
Last active
January 12, 2016 13:56
-
-
Save roolo/225d22bcc585cd19c474 to your computer and use it in GitHub Desktop.
This file contains 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 | |
cd /usr/local/var | |
tar -vcf postgres-data-9.4.tar postgres | |
mv postgres postgres.old | |
initdb postgres -E utf8 | |
pg_upgrade --old-datadir postgres.old \ | |
--new-datadir postgres \ | |
--old-bindir /usr/local/Cellar/postgresql/9.4.5_2/bin/ \ | |
--new-bindir /usr/local/Cellar/postgresql/9.5.0/bin | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
./analyze_new_cluster.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment