From: | Samed YILDIRIM <samed(at)reddoc(dot)net> |
---|---|
To: | abbas alizadeh <ramkly(at)yahoo(dot)com> |
Cc: | Erik Wienhold <ewie(at)ewie(dot)name>, Scott Ribe <scott_ribe(at)elevated-dev(dot)com>, Teju Jakkidi vlogs <teja(dot)jakkidi05(at)gmail(dot)com>, Holger Jakobs <holger(at)jakobs(dot)com>, pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Duplicate data even with primary keys enabled |
Date: | 2022-10-29 14:47:20 |
Message-ID: | CAAo1mbnaRGwGMC77QjnW-iOwz6tv_PPgd3W=Z7EsPkHuAFVS=Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
If you used CONCURRENTLY while creating your index, there is a possibility
that you hit a bug, which was fixed with 14.4.
*However, if you have any indexes that were created using the CONCURRENTLY
option under 14.X, you should re-index them after updating. See the first
changelog entry below.*
https://www.postgresql.org/docs/14/release-14-4.html
Best regards.
Samed YILDIRIM
On Sat, 29 Oct 2022, 14:21 abbas alizadeh, <ramkly(at)yahoo(dot)com> wrote:
> 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(at)ewie(dot)name> wrote:
> >
> >
> >>
> >> On 28/10/2022 22:50 CEST Scott Ribe <scott_ribe(at)elevated-dev(dot)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
> >
> >
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Samed YILDIRIM | 2022-10-29 14:53:04 | Re: Duplicate data even with primary keys enabled |
Previous Message | Jayson Hreczuck | 2022-10-29 14:40:54 | Re: Duplicate data even with primary keys enabled |