From: | Karen Goh <karenworld(at)yahoo(dot)com> |
---|---|
To: | Keith <keith(at)keithf4(dot)com> |
Cc: | "Amit S(dot)" <comeonamit(at)gmail(dot)com>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org> |
Subject: | Re: How do I upgrade psql from version 7 to be 10 in Windows 10? |
Date: | 2019-07-29 00:46:41 |
Message-ID: | 1675186317.4840479.1564361201163@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Sent from Yahoo Mail for iPhone
On Monday, July 29, 2019, 8:33 AM, Keith <keith(at)keithf4(dot)com> wrote:
On Sun, Jul 28, 2019 at 8:27 PM Karen Goh <karenworld(at)yahoo(dot)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.
But, my database is residing in version 10, not 7. So, I really need to just upgrade the psql.exe to version 10. Actually I don’t know why psql is version 7 and the server for my database is in 10.
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.
https://www.postgresql.org/docs/10/app-pg-dumpall.html
https://www.postgresql.org/docs/10/app-pgdump.html
https://www.postgresql.org/docs/10/app-pgrestore.html
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).
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2019-07-29 01:53:25 | Re: How do I upgrade psql from version 7 to be 10 in Windows 10? |
Previous Message | Keith | 2019-07-29 00:33:30 | Re: How do I upgrade psql from version 7 to be 10 in Windows 10? |