On Fri, 17 Jan 2025 10:27:04 -0500 Tom Lane <tgl@xxxxxxxxxxxxx> wrote: > Kamen Kalchev <kalchev035@xxxxxxxxx> writes: > > Hi everyone, we're planning to upgrade the OS running Postgres from > > ubuntu jammy to ubuntu noble. As part of the OS change, the glibc > > version will be changed from glibc 2.35 to glibc 2.39.. > > Can someone confirm if changing the glibc between those versions > > will require a full reindex of the Postgres cluster? > > Maybe, maybe not. According to [1], the last glibc collation change > that the PG community really noticed was in glibc 2.28. So maybe > there weren't any significant changes between 2.35 and 2.39. The > conservative path would certainly be to reindex all textual columns > (though you can skip any that have collation "C"). I haven't run 2.39 through the scan yet [1]; I should do that because someone was asking the same question on postgres slack. But note that every single ubuntu LTS and every single RHEL major release in the last 10 years has had collation changes, except for ubuntu 14.04 ... so it's worth being cautious. Collations are a bit like time zones - small changes are always happening, but you might not always notice. Jeff Davis and I did a talk at the last pgconf about this, the recording is online [2]. Personally I would recommend using the builtin C collation as database default starting in pg17, and using ICU to do linguistic collation at the table or query level when needed. With ICU there's at least the option to rebuild old versions on new operating system majors, if needed. (Though rebuilding objects - not just indexes, but anything depending on the collation - is the best course.) And be careful about hot standbys, FDWs, and other places where you can get little surprises with different OS majors. The YouTube recording has lots of info. -Jeremy 1: https://github.com/ardentperf/glibc-unicode-sorting 2: https://www.youtube.com/watch?v=KTA6oau7tl8