Re: BUG #17892: Bug primary key

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: comanicibogdy(at)yahoo(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17892: Bug primary key
Date: 2023-04-12 12:03:28
Message-ID: 824558.1681301008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> We have a database with over 3 milions apps in it
> Something happend we just found duplicates with same id, but we have
> constraints : PRIMARY KEY on id

With no details it's impossible to do more than speculate.
However, if these are string-type columns then a possible cause
is an OS update having changed collation rules underneath you.
There's more details about that in

https://wiki.postgresql.org/wiki/Locale_data_changes

In any case the path to follow is to manually fix the duplicates
and REINDEX.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Justin Pryzby 2023-04-12 17:52:25 Re: Unlimited memory consumption with long-lived connection
Previous Message PG Bug reporting form 2023-04-12 12:00:01 BUG #17893: Assert failed in heap_update()/_delete() when FK modiified by RI trigger in non-read-committed xact