很好我使用“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.
更多推荐
发布评论