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.
It seems you forgot to drop all large objects. List their IDs by checking in pg_largeobject
and delete them using lo_unlink
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With