Re: B-tree Index corruption

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Filip Sedlák <filip(at)sedlakovi(dot)org>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Michal Danilák <michal(at)monitora(dot)cz>
Subject: Re: B-tree Index corruption
Date: 2023-11-20 15:16:34
Message-ID: 1317056.1700493394@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?UTF-8?Q?Filip_Sedl=C3=A1k?= <filip(at)sedlakovi(dot)org> writes:
> We're on version 15.3 and I see some index misbehaviour fixed in 15.5
> but nothing on btree over text values. I saw some posts about glibc
> upgrade changing collation rules but I don't think it's our case because
> we see it with plain ASCII values.

Sadly, you're wrong about that; see the example at

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

If you did an OS upgrade across a glibc collation change, it's best to
assume all your indexes on textual columns are corrupt and REINDEX
them.

> More importantly, we last upgraded
> the major OS version in June but I was able to find a row missing from
> the index that was inserted a few weeks ago.

It can take awhile before the results of inconsistent sorting order
become obvious, but the state of the index will progressively degrade
as new entries get inserted into the wrong subtree.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Migowski 2023-11-20 15:40:54 AW: BUG #18205: Performance regression with NOT NULL checks.
Previous Message Tom Lane 2023-11-20 15:10:44 Re: BUG #18208: ts_headline MinWords and MaxWords cannot be set to the same value