0

in the past i upgraded postgresql server from 9.3 to 9.6 version in this way:

(dump all the DBs)
apt-get install postgresql-9.6 postgresql-contrib-9.6
pg_dropcluster 9.6 main --stop
pg_upgradecluster 9.3 main
pg_dropcluster 9.3 main

And then, i relaunched the initdb, recreated the databases and restored with the previous dumps. now i want to upgrade from 9.6 to 10 or major. Is there a way to do this without dump all the DBs and then restore them? Thanks in advance

Duplicate: How to upgrade PostgreSQL from version 9.6 to version 10.1 without losing data?

  • 2
    You can try `pg_upgrade` (https://www.postgresql.org/docs/9.6/pgupgrade.html) – IVO GELOV Apr 05 '19 at 06:53
  • After running `pg_upgradecluster` you do **not** need to `initdb` and restore the database, `pg_upgradecluster` handled everything for your. You can speed things up by using the `--method=upgrade` which uses `pg_upgrade` in the background. http://manpages.ubuntu.com/manpages/trusty/en/man8/pg_upgradecluster.8.html –  Apr 05 '19 at 07:32
  • I tried the `pg_upgradecluster` method and at the end of the process all is OK but seems some parts of the DB were lost during the process ... – Christian Marinelli Apr 12 '19 at 13:57

0 Answers0