Installing Postgres 9.5 On OSX
Edit 12/25/2020: I’d recommend using: https://postgresapp.com/
Ended up being surprisingly easy:
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
brew uninstall postgresql | |
brew install postgresql-9.5 | |
brew link -f postgresql-9.5 | |
mv /usr/local/var/postgres /usr/local/var/postgres.old | |
initdb -D /usr/local/var/postgres | |
# restore old database? | |
# pg_upgrade -b /usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.1.2/bin -d /usr/local/var/postgres.old -D /usr/local/var/postgres | |
# start postgres | |
pg_ctl -D /usr/local/var/postgres -l logfile start |