Re: BUG #16938: Duplicate records with same Primary Key - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16938: Duplicate records with same Primary Key
Date
Msg-id 641364.1616437368@sss.pgh.pa.us
Whole thread Raw
In response to BUG #16938: Duplicate records with same Primary Key  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> We're running an instance of postgres 13.2 and some days ago we noticed
> duplicated rows with the same primary key.

If the key column is of a text type, you might have gotten bit by
operating-system-level changes of sorting rules, which would effectively
make indexes on text columns corrupt [1].  If so, reindexing is the
appropriate fix.  There's work in progress to try to notice this sort
of problem automatically, but it's not done yet.

            regards, tom lane

[1] https://wiki.postgresql.org/wiki/Locale_data_changes



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16938: Duplicate records with same Primary Key
Next
From: Scott
Date:
Subject: Multiple Values Inserts for Generated Columns Erroring Out