You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Andreas Hartmann <an...@apache.org> on 2009/07/27 18:48:12 UTC
Problem restoring dump with BLOBs
Hi everyone,
to import a new version of the schema, I create and restore a dump as
follows:
pg_dump --data-only --oids --file $dumpfile $db_name
psql -1 […] $db_name < $schemafile
psql -1 […] $db_name < $dumpfile
However, when the dump is restored, I get the following error message:
ERROR: duplicate key value violates unique constraint
"pg_largeobject_loid_pn_index"
I tried to clear the pg_largeobject table before restoring the dump, but
this leads to errors like "PSQLException: ERROR: large object 23313 does
not exist" when I access the data afterwards.
Thanks a lot for any hints!
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
[sorry for the OT mail] Re: Problem restoring dump with BLOBs
Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann schrieb:
> Hi everyone,
>
> to import a new version of the schema, I create and restore a dump as
> follows:
Sorry for the noise, I accidentially posted to the wrong list.
-- Andreas
>
>
> pg_dump --data-only --oids --file $dumpfile $db_name
> psql -1 […] $db_name < $schemafile
> psql -1 […] $db_name < $dumpfile
>
>
> However, when the dump is restored, I get the following error message:
>
> ERROR: duplicate key value violates unique constraint
> "pg_largeobject_loid_pn_index"
>
> I tried to clear the pg_largeobject table before restoring the dump, but
> this leads to errors like "PSQLException: ERROR: large object 23313 does
> not exist" when I access the data afterwards.
>
> Thanks a lot for any hints!
>
> -- Andreas
>
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01