Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Update PostgreSQL
- This document briefly describes how to upgrade PostgreSQL from 9.4.5 to 9.5 and assumes the installation was done with Homebrew
- . (Upgrades between other versions should be similar)
- ## Stop the server
- pg_ctl stop -w -D /usr/local/var/postgres
- ## Upgrade with homebrew
- brew upgrade postgresql
- ## Initialize a new 9.5 database
- initdb /usr/local/var/postgres9.5 -E utf8
- ## Run pg_upgrade
- pg_upgrade -v \
- -d /usr/local/var/postgres \
- -D /usr/local/var/postgres9.5 \
- -b /usr/local/Cellar/postgresql/9.4.5/bin/ \
- -B /usr/local/Cellar/postgresql/9.5.0/bin/
- ## Move new data into place
- cd /usr/local/var
- mv postgres postgres9.4
- mv postgres9.5 postgres
- ## Restart the server
- pg_ctl start -D /usr/local/var/postgres -w -l /usr/local/var/postgres/postgres-server.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement