Make a temporary home for the new database mkdir -p /usr/local/var/postgres9.3 Tell postgres to set up the new database initdb /usr/local/var/postgres9.3 -E 'UTF-8' --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8' Migrate the data pg_upgrade -d /usr/local/var/postgres9.2/ -D /usr/local/var/postgres9.3/ -b /usr/local/Cellar/postgresql/9.2.1/bin/ -B /usr/local/Cellar/postgresql/9.3.1/bin/ -v Make the new db the canonical db ln -s /usr/local/var/postgres9.3/ /usr/local/var/postgres Delete old cluster data: ./delete_old_cluster.sh Delete unneeded helper files rm analyze_new_cluster.sh delete_old_cluster.sh Restart the postgres daemon launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist Now reload pg gem for every ruby/gemset... gem uninstall pg && gem install pg