pg_dump 9.0 到 pg_restore 8.3
是否可以指示 9.0 的 pg_dump 提供向后兼容的转储,或强制 8.3 的 pg_restore 使用该转储?
换句话说,在解决使用 pg_restore 8.3 恢复 9.0 生成的转储时,我有哪些选择:
pg_restore: [archiver] unsupported version (1.12) in file header
此转储/恢复版本冲突的可能警告是什么?
Is it possible to instruct pg_dump of 9.0 to provide a 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建纯文本转储:
这应该可以正常工作,因为它不存储版本信息,并且在转储中使用纯 SQL 格式。数据通过 COPY 恢复,速度很快。如果您在数据库中使用了一些 9.0 功能,那么您必须手动编辑转储中的架构以使其在 8.3 上工作。然而,Blob 可能无法在这种格式中保存下来;我没有测试过)。
Create a plain text dump:
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).