0

My Windows hard drive died and I transferred the secondary hard drive (on which my PostgreSQL 9.4 database was installed) to my new PC.

Since all programs needed to be reinstalled, I then downloaded and installed PostgreSQL 12 into the folder adjacent to my earlier 9.4 install.

When I run pgAdmin 4, I can only see the default PostgreSQL 12 database. How can I connect to, use and hopefully migrate my old 9.4 database?

enter image description here

enter image description here

3
  • 1
    Follow the article Upgrade PostgreSQL 9.X to 12.X in Windows. Let me know if you have missed out on any of the described steps. be careful, as some of the examples have a spurious space inserted in the middle of the folder name.
    – harrymc
    Commented Jul 26, 2021 at 13:45
  • I have jumped through a few hoops but still not there yet. I ended up uninstalling 12 and installing 9.4.26 (which is the closest version I can find). The installer wouldn't allow me to install into my old 9.4 folder. I then tried to copy the data folder from 9.4 to 9.4.26 but that errored. The export 9.4 to db.out seemed to work but the file was unexpectedly small. I still need to figure out how to import it into 9.4.26 using command line or pgAdminIII. The page you referred me too is pretty comprehensive but has some odd English which makes it tricky to follow.
    – MSC
    Commented Jul 29, 2021 at 4:54
  • It turns out that it wasn't my old Windows boot drive which had died but the motherboard. Once I discovered this, I was able to boot from that disk instead and run pgAdminIII (on PG 9.4) to backup the database to a file. I then booted from the new Windows drive and was able to restore the file to a blank database in pgAdmin4 running PG 9.6.
    – MSC
    Commented Aug 28, 2021 at 6:00

0

You must log in to answer this question.

Browse other questions tagged .