pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Filip Sedlák <filip@sedlakovi.org>
Cc: pgsql-bugs@lists.postgresql.org, Michal Danilák <michal@monitora.cz>
Subject: Re: B-tree Index corruption
Date: Mon, 20 Nov 2023 10:16:34 -0500
Message-ID: <1317056.1700493394@sss.pgh.pa.us> (raw)
In-Reply-To: <8cf27c03-941e-4b12-9bdc-06237c0302d4@sedlakovi.org>
References: <8cf27c03-941e-4b12-9bdc-06237c0302d4@sedlakovi.org>

=?UTF-8?Q?Filip_Sedl=C3=A1k?= <filip@sedlakovi.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





view thread (3+ messages)  latest in thread

Message-ID: <1317056.1700493394@sss.pgh.pa.us>
Permalink:  ../1317056.1700493394@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1317056.1700493394@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, filip@sedlakovi.org, michal@monitora.cz
  Subject: Re: B-tree Index corruption
  In-Reply-To: <1317056.1700493394@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