Hi, Laurenz ! We can grab the text for problem description from https://wiki.postgresql.org/wiki/Locale_data_changes
Regarding finding the affected indexes, ready SQL queries for various PG versions are listed in the EDB KBA <https://knowledge.enterprisedb.com/hc/en-us/articles/13520015051420-glibc-locale-data-changes> written by Peter Eisentraut. Or/and we can use amcheck as you suggested. Also we should mention that not only indexes can be affected by locale changes, but other objects like range-partitioned tables. One more thing to stress is that locale changes can happen during the lifecycle of the same major OS version, so any OS updates need to be verified for glibc changes. Pls. let me know how you would like to proceed. best regards, Alexey Shishkin *Alexey Shishkin* Technical Account Manager EDB Software GmbH [email protected] www.enterprisedb.com <https://enterprisedb.com/> Planned PTO: Nov-13 - Nov-15, Nov-21 - Nov-23 On Wed, Oct 28, 2026 at 10:02 PM Laurenz Albe <[email protected]> wrote: > On Wed, 2026-10-28 at 14:32 +0100, Alexey Shishkin wrote: > > On the other hand it should not be only for PG20, but rather for all > previous PG versions too. > > Yes, perhaps. > > > About the structure: > > - first, we should refer to Locale Providers chapter > > - then mention that icu/libc locale providers are backed by libicu/glibc > libraries which > > versions might change from time to time (even within the lifecycle of > the same major version of OS) > > - libicu/glibc version changes might lead to changes of SQL-queries > which use affected indexes, so > > it's important to keep an eye on such changes > > Simpler said, an index can become corrupted, leading to bad query results > and in due course to violated unique constraints. > > > - the next item should describe what to do in case of libicu/glibc > version changes - mainly about > > rebuilding the indexes, but not only > > - finally, we should provide the list of commands to identify affected > indexes, to rebuild them > > online/offline, concurrently etc. > > There are several strategies to deal with the problem: > > - rebuild all indexes (simple, slow) > - identify all indexes that involve strings (a bit more complicated, > faster) > - check all indexes with amcheck and rebuild only those with a problem > (leaves a window where users couls get bad query results > - perform a test upgrade and find the affected indexes ahead of time > > Yours, > Laurenz Albe >
