Postgres 9.3备份和恢复错误(Postgres 9.3 Backup and Restore Error)

编程入门 行业动态 更新时间:2024-10-26 16:27:20
Postgres 9.3备份和恢复错误(Postgres 9.3 Backup and Restore Error)

很好我使用“pg_dump”实用程序备份了我的数据库(转储文件名是“testbackup.sql”)。在恢复它之前,我删除了我创建的所有表,视图,序列和函数。 之后使用“psql”命令尝试恢复转储。但它显示重复键冲突错误。 **

错误:psql.bin:testbackup.sql:17884:错误:重复键值违反唯一约束“pg_largeobject_metadata_oid_index”。

**我在网上搜索但我无法找到正确的解决方案。请向我们提供合适的解决方案。

Fine i have taken backup of my database using "pg_dump" utility(dump file name is "testbackup.sql").Before restoring it back,i dropped all tables,view,sequences,functions which i have created. After that using "psql" command try to restore the dump back.But it shows the duplicate-key violation error. **

Error : psql.bin:testbackup.sql:17884: ERROR: duplicate key value violates unique constraint "pg_largeobject_metadata_oid_index".

**I googled in internet but i cant come to a correct solution.so Kindly provide us theproper solution.

最满意答案

你似乎忘记丢弃所有大型物体。 通过检入pg_largeobject列出他们的ID并使用lo_unlink删除它们。

It seems you forgot to drop all large objects. List their IDs by checking in pg_largeobject and delete them using lo_unlink.

更多推荐

本文发布于:2023-08-06 02:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1442069.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:备份   错误   Postgres   Restore   Backup

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!