I have a system that only supports version 9.1 of postgres and a client (company) has been managing their data with version 10. There are many tables and I need to know if there is a script to downgrade the database from version 10 to 9.1 . Thanks in advance!
-
3Postgres 9.1 is 5+ years after EOL, do not use it. Why does the system only run 9.1? The chances of going from 10 --> 9.1 successfully is slim to none.Adrian Klaver– Adrian Klaver2022-04-22 22:39:15 +00:00Commented Apr 22, 2022 at 22:39
-
You have no support for version 9.1 at all. Software that can only use this version, has no support either, it’s outdated for at least 5 years. Software that old and without support, should be avoided like the plagueFrank Heikens– Frank Heikens2022-04-23 07:32:41 +00:00Commented Apr 23, 2022 at 7:32
1 Answer
As other commenters have already stated, PostgreSQL 9.1 is long obsolete, and this is a bad idea in general. However, to answer your question, you would have to dump the data with pg_dump into plain SQL statements using the latest pg_dump utility from PG 10.
pg_dump --column-inserts
which will produce a plain text file that can be restored back to 9.1 using the psql utility from 9.1. It will be super slow and painful, as it should be when you are going in the decidedly wrong direction. A better answer would be to figure out why 9.1 is necessary, as @adrian.klaver mentions.
Yes, @AdrianKlaver is correct. Any new features will break the transfer.