From: | Ankur Kaushik <ankurkaushik(at)gmail(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey" |
Date: | 2015-06-15 13:14:26 |
Message-ID: | CALXoLqwzi8jUNXjKOw0=SYbmiGvspyY1Hwa2gxUm4RL=dHKT8g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
I think this is not a database corrupt , While create a new database there
is already Entry in geocode_setting tiger schema . Correct me If I am
Wrong .
On Mon, Jun 15, 2015 at 4:49 PM, Ankur Kaushik <ankurkaushik(at)gmail(dot)com>
wrote:
>
> I opened the Backup File seen , The duplicate error came in schema : tiger
> , table : geocode_setting , already data for primary key column
> exist "debug_geocode_address" primary key value
>
> What is use of tiger schema , is related postGIS . Can we take dump for
> only schema public ?
>
> On Mon, Jun 15, 2015 at 3:27 PM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
> wrote:
>
>> Ankur Kaushik wrote:
>> > I took Backup using below command
>> > pg_dump "database name" | gzip > /root/dump.sql.gz
>> >
>> >
>> >
>> > While restoring in fresh PostgreSQL server getting below error .
>> >
>> > ERROR: duplicate key value violates unique constraint
>> "geocode_settings_pkey"
>> > DETAIL: Key (name)=(debug_geocode_address) already exists.
>>
>> That looks like data corruption on the original database.
>>
>> Look at https://wiki.postgresql.org/wiki/Corruption and
>> follow the "VITALLY IMPORTANT FIRST RESPONSE".
>>
>> Check if that is the only row that violates the constraint.
>> You could manually delete all offending rows on the source,
>> then dump/restore (don't continue working with the database
>> even if it seems consistent again).
>>
>> Yours,
>> Laurenz Albe
>>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2015-06-15 15:59:31 | Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey" |
Previous Message | Ankur Kaushik | 2015-06-15 11:19:21 | Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey" |