Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What will happen to my postgres database, if I downgrade my PostgreSQL?

I am using postgres 9.5. Suppose my system postgres got downgraded into 9.2. Will my old database works with newly installed postgres as it is?(backword compatibility) Or do I have to do some manual operations?

In other words, say I have a postgres database works with the latest version. Can I use the same database in other systems which run other supported versions of postgres (but not the latest)?

like image 707
nithinj Avatar asked Nov 21 '25 06:11

nithinj


1 Answers

There is no supported way to downgrade PostgreSQL to a lower major release.

You will have to pg_dumpall with 9.5 and then try to install the dump in 9.2.

There will be error messages if the 9.5 dump uses features that were not present in 9.2 yet. In that case, edit the dump and fix it for 9.2.

like image 103
Laurenz Albe Avatar answered Nov 23 '25 07:11

Laurenz Albe