Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
you might find this by @depesz helpful too – Jack Douglas Mar 9 '12 at 9:02

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.

share|improve this answer
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
@Catcall: Seems to be the only way out. – Erwin Brandstetter Apr 12 '12 at 4:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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