Re: "duplicate key violates unique constraint" error

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: tamanna madaan <tamanna(dot)madan(at)globallogic(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Ashish Sharma <ashish(dot)sharma(at)globallogic(dot)com>, Gaurav Katiyar <gaurav(dot)katiyar(at)globallogic(dot)com>
Subject: Re: "duplicate key violates unique constraint" error
Date: 2009-11-12 14:17:40
Message-ID: dcc563d10911120617w3543d345tc7245ba552f72984@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 11, 2009 at 10:12 PM, tamanna madaan
<tamanna(dot)madan(at)globallogic(dot)com> wrote:
>
>
>  Hi All
>
>
>
> I have a cluster setup with one master and one slave . Replication from
> master to slave is not taking place.
>
> I am getting this error  “duplicate key violates unique constraint”  in my
> slon.log on slave . This error is thrown while
>
> Slon is inserting a row in a table  on slave. This must be because of the
> reason that duplicate rows
>
> are being returned while querying sl_log_1 table.  I googled about the same
> problem and found that
>
> there is some bug in postgres due to which some table or index on that table
> gets corrupted. Due to this

If your underlying file system is unreliable and results in a
corrupted index that allows postgresql to insert duplicate rows, that
is NOT a bug in postgresql, it is a failing in your hardware / OS that
you need to get fixed. Pgsql can't be blamed for errors created by
bad hardware, and no amount of coding can overcome that deficit.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2009-11-12 14:51:52 Re: re-using RETURNING
Previous Message Jérôme Etévé 2009-11-12 14:11:32 Re: What is the simpliest text search configuration?