Re: BUG #17892: Bug primary key - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17892: Bug primary key
Date
Msg-id 824558.1681301008@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17892: Bug primary key  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17892: Bug primary key
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

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