My OS is windows 7 x64. I was use postgres 8.4, and all databases are in postgres/8.4/data. Yesterday, I reinstalled my os system, but I found I can't install postgres 8.4 anymore (there is always an error when installing), so I installed postgres 9.1.

But I don't know how to reuse the data of postgres 8.x. I tried to copy the data from postgres/8.4/data to postgres/9.1/data, but the postgres service won't start.

Is there any way to reuse that. Since I have a lot of data in postgres/8.4/data, I can't loose them.


What you need is a dump / restore. However, for this to work, you need the old PostgreSQL 8.4 server running. The new version 9.1 is not binary compatible and cannot use the files in postgres/8.4/data directly.

If you have no backup and cannot run PostgreSQL 8.4 on your machine any more, you are out of luck. Why is it that you cannot install PostgreSQL 8.4 any more? You'll have to, if you want your data.

On a side note:
It is recommended that you use the pg_dump and pg_dumpall programs from the newer version of PostgreSQL, to take advantage of any enhancements that may have been made in these programs.

  • 1
    The OP might be able to install 8.4 on a different machine, and move the data files to it. Then pg_dumpall from 8.4, move the dump files to 9.1, and load them. – Mike Sherrill 'Cat Recall' Apr 10 '12 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.