Skip to content

Instantly share code, notes, and snippets.

@nigma
Created July 17, 2013 22:04
Show Gist options
  • Save nigma/6024968 to your computer and use it in GitHub Desktop.
Save nigma/6024968 to your computer and use it in GitHub Desktop.
RUNAS /USER:postgres "CMD.EXE"
SET PATH=C:\Program Files\PostgreSQL\9.2\bin;%PATH%
pg_upgrade.exe --check --old-datadir "c:\ProgramData\PostgreSQL\9.1\data" --new-datadir "c:\ProgramData\PostgreSQL\9.2\data" --old-bindir "C:/Program Files/PostgreSQL/9.1/bin" --new-bindir "C:/Program Files/PostgreSQL/9.2/bin" --old-port 50431 --new-port 50432 --retain
- use the same locale when creating new cluster
- give postgres user access to the new cluster data directory
- change pg_hba.conf auth method to trust for both clusters
- cwd to directory where postgres user has write permissions
- tablespace junction/symlinks may break. use dump/restore for problematic tables
- clean up old cluster and adjust new port in postgresql.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment