开发者

pg_dump 9.0 to pg_restore 8.3

Is it possible to instruct pg_dump of 9.0 to provide a开发者_如何学Go backward-compatible dump, or force pg_restore of 8.3 to work with that dump?

In other words, what are my options in resolving this error on restoring dump made with 9.0 with pg_restore 8.3:

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

What are the possible caveats of this dump/restore version conflict?


Create a plain text dump:

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

This should work OK, as it stores no version information, and uses plain SQL format in the dump. The data is restored with COPY so it's fast. If you've used some 9.0 features in the DB, then you'll have to manually edit the schema in the dump to make it work on 8.3. Blobs may not survive this format however; I've not tested that).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜