pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: abbas alizadeh <ramkly@yahoo.com>
To: Erik Wienhold <ewie@ewie.name>
Cc: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Teju Jakkidi vlogs <teja.jakkidi05@gmail.com>
Cc: Holger Jakobs <holger@jakobs.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Duplicate data even with primary keys enabled
Date: Sat, 29 Oct 2022 15:20:58 +0400
Message-ID: <C254B8F9-9779-4F8F-BDAB-C55E7088FA7C@yahoo.com> (raw)
In-Reply-To: <2102110489.726355.1667002718732@office.mailbox.org>
References: <2102110489.726355.1667002718732@office.mailbox.org>

Hi all.
I faced the same issue last week. 
We had duplicated records on primary key. 
Postgresql version is 14.4


Sent from my iPhone

> On 29 Oct 2022, at 4:18 AM, Erik Wienhold <ewie@ewie.name> wrote:
> 
> 
>> 
>> On 28/10/2022 22:50 CEST Scott Ribe <scott_ribe@elevated-dev.com> wrote:
>> 
>> A corrupted index could allow that to happen by failing to catch the duplicate
>> insert. I suppose it might also be able to cause the same row to be returned
>> multiple times--although I have personally only ever seen corrupted indexes
>> cause rows to not be found.
> 
> I think it should be possible to tell those two cases apart by looking at system
> column ctid.  The ctid should be the same for duplicate rows if the same row is
> found multiple times in the index.  Different ctid if the corrupted index
> allowed INSERT with duplicates.
> 
> --
> Erik
> 
> 






view thread (26+ messages)  latest in thread

Message-ID: <C254B8F9-9779-4F8F-BDAB-C55E7088FA7C@yahoo.com>
Permalink:  ../C254B8F9-9779-4F8F-BDAB-C55E7088FA7C@yahoo.com/
Also on:    postgresql.org/message-id/C254B8F9-9779-4F8F-BDAB-C55E7088FA7C@yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ramkly@yahoo.com, ewie@ewie.name, scott_ribe@elevated-dev.com, teja.jakkidi05@gmail.com, holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Duplicate data even with primary keys enabled
  In-Reply-To: <C254B8F9-9779-4F8F-BDAB-C55E7088FA7C@yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox