Re: Duplicate data even with primary keys enabled

Поиск
Список
Период
Сортировка
От abbas alizadeh
Тема Re: Duplicate data even with primary keys enabled
Дата
Msg-id C254B8F9-9779-4F8F-BDAB-C55E7088FA7C@yahoo.com
обсуждение исходный текст
Ответ на Re: Duplicate data even with primary keys enabled  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: Duplicate data even with primary keys enabled  (Scott Ribe <scott_ribe@elevated-dev.com>)
Re: Duplicate data even with primary keys enabled  (Samed YILDIRIM <samed@reddoc.net>)
Список pgsql-admin
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
>
>




В списке pgsql-admin по дате отправления:

Предыдущее
От: Jwiencek3
Дата:
Сообщение: Re: Duplicate data even with primary keys enabled
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: Duplicate data even with primary keys enabled