Pg_dump 9.0 to pg_restore 8.3

Is it possible to instruct pg_dump from 9.0 to provide a dump with backward compatibility, or to make pg_restore 8.3 work with this dump?

In other words, what are my options for resolving this error when restoring a dump made using 9.0 with pg_restore 8.3:

pg_restore: [archiver] unsupported version (1.12) in file header 

What are the possible caveats about this conflict with dump / version recovery?

+4
source share
1 answer

Dump the plain text:

 pg_dump mydb > db.sql psql -d newdb -f db.sql 

This should work fine as it does not store version information and uses a simple SQL format in the dump. Data is being restored with COPY so quickly. If you used some functions of 9.0 in the database, you will have to manually edit the scheme in the dump so that it works on 8.3. However, Blobs cannot survive in this format; I have not tested this).

+12
source

Source: https://habr.com/ru/post/1346522/


All Articles