Skip to content

Instantly share code, notes, and snippets.

@isccarrasco
Forked from joho/gist:3735740
Last active August 29, 2015 14:22
Show Gist options
  • Save isccarrasco/dfcc77a722a14c14eefe to your computer and use it in GitHub Desktop.
Save isccarrasco/dfcc77a722a14c14eefe to your computer and use it in GitHub Desktop.
Update PostgreSQL on Mac
### Steps to upgrade/install and run PostgreSQL 9.4.3 using Homebrew (Mac OS X)
(if you aren't using version 9.3.5_1, change line 6 with the correct version)
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. mv /usr/local/var/postgres /usr/local/var/postgres-9.3
3. brew update
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.3.5_1/bin -B /usr/local/Cellar/postgresql/9.4.3/bin -d /usr/local/var/postgres-9.3 -D /usr/local/var/postgres
7. cp /usr/local/Cellar/postgresql/9.4.3/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
8. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment