Skip to content

Instantly share code, notes, and snippets.

@lpf23
Created June 7, 2015 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lpf23/188246f2f73a2acc1516 to your computer and use it in GitHub Desktop.
Save lpf23/188246f2f73a2acc1516 to your computer and use it in GitHub Desktop.
brew install postgresql (notes)
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/Homebrew/homebrew/issues/2510
To migrate existing data from a previous major version (pre-9.4) of PostgreSQL, see:
https://www.postgresql.org/docs/9.4/static/upgrading.html
To have launchd start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or, if you don't want/need launchctl, you can just run:
postgres -D /usr/local/var/postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment