Re: How do I upgrade psql from version 7 to be 10 in Windows 10? - Mailing list pgsql-novice

From Keith
Subject Re: How do I upgrade psql from version 7 to be 10 in Windows 10?
Date
Msg-id CAHw75vs7U5n3ENeBUrsvC5s-DfdFVd=qNeH03mByOfJauPkRfQ@mail.gmail.com
Whole thread Raw
In response to Re: How do I upgrade psql from version 7 to be 10 in Windows 10?  (Karen Goh <karenworld@yahoo.com>)
Responses Re: How do I upgrade psql from version 7 to be 10 in Windows 10?
List pgsql-novice


On Sun, Jul 28, 2019 at 8:27 PM Karen Goh <karenworld@yahoo.com> wrote:

no. I think you have problem understanding my requirements. I need to know how to upgrade my psql 7 to 10! I need to solve this for good




You must dump and restore your database to upgrade from a version that old. pgupgrade will not work with a version jump that drastic.

Use pg_dumpall -g to dump out the global objects (roles, tablespaces, etc). And use pg_dump to dump out the individual databases. And be sure to use the pgdump from version 10 to create the dump files, not the old version.
Then you can feed the file created by pg_dumpall into the new database using psql -f since it's a plain sql file.
Then use pg_restore to restore the database dump(s).

pgsql-novice by date:

Previous
From: Karen Goh
Date:
Subject: Re: How do I upgrade psql from version 7 to be 10 in Windows 10?
Next
From: Karen Goh
Date:
Subject: Re: How do I upgrade psql from version 7 to be 10 in Windows 10?