Re: BUG #9384: Restore Database using psql utility fails - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #9384: Restore Database using psql utility fails
Date
Msg-id CAB7nPqQfQwoBcpgRyrkOdAZ9AirNCEyg_qN=LzQS3yRQ9PZKww@mail.gmail.com
Whole thread Raw
In response to BUG #9384: Restore Database using psql utility fails  (rajkumarmca1488@gmail.com)
List pgsql-bugs
On Fri, Feb 28, 2014 at 11:55 PM,  <rajkumarmca1488@gmail.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      9384
> Logged by:          Rajkumar.K
> Email address:      rajkumarmca1488@gmail.com
> PostgreSQL version: 9.3.2
> Operating system:   Linux CentsOs 6.4
> Description:
>
> 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.
There is no bug here. The error you are seeing is caused by an
existing large object, which is something different from the objects
you seem to have manually dropped:
http://www.postgresql.org/docs/devel/static/largeobjects.html
If you are going to use the same server to restore the data taken from
the dump, you should at least remove those large objects as well...
--
Michael

pgsql-bugs by date:

Previous
From: "..: Mark Sloan :.."
Date:
Subject: Re: BUG #9374: some timzone abbver is missing from pg_timezone_abbrevs that are in pg_timezone_names
Next
From: Michael Paquier
Date:
Subject: Re: BUG #9398: DELETE refering to a materialized view produces "cannot lock rows in materialized view" error