Re: How duplicate values inserted into the primary key column of table and how to fix it

From: Patrick Headley <pheadley(at)linxco-inc(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: How duplicate values inserted into the primary key column of table and how to fix it
Date: 2019-01-24 20:28:25
Message-ID: b2d14894-f5c7-8ac7-5fe8-2c5f9c40756e@linxco-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Sounds like you need a unique constraint on the PK field. The duplicate
values may be inserted if the sequence on the PK is out of sync (if
there is a sequence providing values for the PK).

*/Patrick Headley/*
Linx Consulting, Inc.
(303) 916-5522
pheadley(at)linxco-inc(dot)com
www.linxco-inc.com
On 1/24/19 8:30 AM, Adrian Klaver wrote:
> On 1/24/19 4:46 AM, Raghavendra Rao J S V wrote:
>> Hi All,
>>
>>
>> We are using Postgresql 9.2 database.
>>
>> In one of the transactional table, I have observed duplicate values
>> for the primary key columns.
>
> Best guess a corrupted index. As Hellmuth said more information would
> be helpful.
>
>>
>> Please guide me how is it possible and how to fix this kind of issue.
>>
>>
>> --
>> Regards,
>> Raghavendra Rao J S V
>>
>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sergei Kornilov 2019-01-24 21:46:04 Re: BUG #15585: infinite DynamicSharedMemoryControlLock waiting in parallel query
Previous Message Thomas Munro 2019-01-24 19:56:00 Re: BUG #15585: infinite DynamicSharedMemoryControlLock waiting in parallel query

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-01-24 21:02:25 Re: duplicate OID issue when using pg_upgrade to move from 9.3 to 9.5
Previous Message Duarte Carreira 2019-01-24 19:28:29 duplicate OID issue when using pg_upgrade to move from 9.3 to 9.5