After upgrading to Yosemite OSX 10.10, I decided to upgrade my local Postgres.app from 9.3 to 9.4. While following the upgrade instructions from the Postgress.app page, I ended up using the
pg_upgrade command with the following options:
pg_upgrade \ -b /Applications/Postgres.app/Contents/Versions/9.3/bin \ -B /Applications/Postgres.app/Contents/Versions/9.4/bin\ -d /Users/whoami/Library/Application\ Support/Postgres/var-9.3\ -D /Users/whoami/Library/Application\ Support/Postgres/var-9.4\ -j 3
whoami command and replace the
whoami value on the command above specific to your local user.
With this command I encountered the following errors:
encoding cluster values do not match: old "UTF8", new "SQL_ASCII"
lc_collate cluster values do not match: old "C", new "en_US.UTF-8"
To go around this issues:
1. Remove (delete) the new cluster directory. From my example it's the
initdb to make a prestine database:
initdb --locale=C /Users/whoami/Library/Application\ Support/Postgres/var-9.4 -E utf8
3. run the
pg_upgradecommand again (see above)
Make sure that you got the your
$PATH configured and pointed to the new version. From here, you can do a
gem install pg smoothly or bump your
Gemfile to the latest