Re: BUG #9384: Restore Database using psql utility fails

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: rajkumarmca1488(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9384: Restore Database using psql utility fails
Date: 2014-03-02 02:54:03
Message-ID: CAB7nPqQfQwoBcpgRyrkOdAZ9AirNCEyg_qN=LzQS3yRQ9PZKww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Feb 28, 2014 at 11:55 PM, <rajkumarmca1488(at)gmail(dot)com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 9384
> Logged by: Rajkumar.K
> Email address: rajkumarmca1488(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2014-03-02 03:15:40 Re: BUG #9398: DELETE refering to a materialized view produces "cannot lock rows in materialized view" error
Previous Message davidpf75 2014-03-01 21:46:59 BUG #9404: (URGENT) problem after calling PQconnectdb, exceptions are not caught