Created
December 30, 2016 19:17
-
-
Save nonword/d964e253f0ccd75dc02d0fedb9c88dd9 to your computer and use it in GitHub Desktop.
upgrade postgres data dir from 9.4 to 9.6
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
# initialize directory: | |
initdb -D /usr/local/var/postgres96 | |
# copy data from old directory | |
pg_upgrade -b /usr/local/Cellar/postgresql/9.4.4/bin -B /usr/local/Cellar/postgresql/9.6.1/bin -d /usr/local/var/postgres -D /usr/local/var/postgres96 | |
# Ensure daemon startup specifies new directory: | |
postgres -D /usr/local/var/postgres96 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment