Skip to content

Instantly share code, notes, and snippets.

@Alexfilus
Created November 26, 2019 12:14
Show Gist options
  • Save Alexfilus/b49e89efa68e6707dc2f9d1e579b009a to your computer and use it in GitHub Desktop.
Save Alexfilus/b49e89efa68e6707dc2f9d1e579b009a to your computer and use it in GitHub Desktop.
Upgrade PG 10->12
/usr/lib/postgresql/12/bin/pg_upgrade \
  --old-datadir=/var/lib/postgresql/10/main \
  --new-datadir=/var/lib/postgresql/12/main \
  --old-bindir=/usr/lib/postgresql/10/bin \
  --new-bindir=/usr/lib/postgresql/12/bin \
  --old-options '-c config_file=/etc/postgresql/10/main/postgresql.conf' \
  --new-options '-c config_file=/etc/postgresql/12/main/postgresql.conf' \
  --check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment