From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jorel Casal <jcasal@ixl.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Corrupt Index
Date: Tue, 15 Mar 2022 12:41:35 -0400
Message-ID: <328626.1647362495@sss.pgh.pa.us> (raw)
In-Reply-To: <CAL+HUv2HQgzt83f8bnnbe8xAUdrdUpb3736Yv2ouM-PCfzp-6w@mail.gmail.com>
References: <CAL+HUv2HQgzt83f8bnnbe8xAUdrdUpb3736Yv2ouM-PCfzp-6w@mail.gmail.com>
Jorel Casal <jcasal@ixl.com> writes:
> During a Patroni leader switchover, we had a situation where a unique index
> stopped "working", the index did not have records
> that were in fact in the table and the table had duplicate records which
> should have been prevented by said unique index.
If the index was on a string type (text/varchar), the most likely
explanation is a switch to a different OS version with inconsistent
collation rules. See
https://wiki.postgresql.org/wiki/Locale_data_changes
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, jcasal@ixl.com
Subject: Re: Corrupt Index
In-Reply-To: <328626.1647362495@sss.pgh.pa.us>
References: <CAL+HUv2HQgzt83f8bnnbe8xAUdrdUpb3736Yv2ouM-PCfzp-6w@mail.gmail.com> <328626.1647362495@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox