Skip to content

Instantly share code, notes, and snippets.

@nabucosound
Last active August 29, 2015 14:11
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 nabucosound/8a79c98f5f5b0eba361d to your computer and use it in GitHub Desktop.
Save nabucosound/8a79c98f5f5b0eba361d to your computer and use it in GitHub Desktop.

Upgrade PostgreSQL

After a "brew upgrade", I had to solve the incompatible data format between versions.

Command history

cd /usr/local/var/postgres/ cat PG_VERSION export LC_CTYPE="UTF-8" mv postgres postgres9.3 initdb postgres -E Unicode pg_upgrade -d postgres9.3 -D postgres -b /usr/local/Cellar/postgresql/9.3.5_1/bin/ -B /usr/local/Cellar/postgresql/9.4.0/bin/ -v

Troubleshooting

The "tables_using_reg.txt" problem:

/usr/local/Cellar/postgresql/9.3.5_1/bin/pg_ctl -D /usr/local/var/postgres9.3 -l /usr/local/var/postgres9.3/server.log start -w dropdb rnovo /usr/local/Cellar/postgresql/9.3.5_1/bin/pg_ctl -D /usr/local/var/postgres9.3 -l /usr/local/var/postgres9.3/server.log stop -w

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment