Skip to content

Instantly share code, notes, and snippets.

@amrnt
Created February 9, 2013 12:47
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 amrnt/4745188 to your computer and use it in GitHub Desktop.
Save amrnt/4745188 to your computer and use it in GitHub Desktop.
Upgrading PostgreSQL
# from: 9.2.2
# to: 9.2.3
mv /usr/local/var/postgres /usr/local/var/postgresOLD
brew upgrade postgresql
initdb /usr/local/var/postgres -E utf8
pg_upgrade -b /usr/local/Cellar/postgresql/9.2.2/bin -B /usr/local/Cellar/postgresql/9.2.3/bin -d /usr/local/var/postgresOLD -D /usr/local/var/postgres
# if previous command fails telling about .s.PGSQL.5432 check the logs (One time i had to fix the permisioin) e.g.
# chmod 700 /usr/local/var/postgres
# chmod 700 /usr/local/var/postgresOLD
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