Hi, On 2025-04-25 10:58, Raphael Hertzog wrote: > Hi, > > On Thu, 24 Apr 2025, Christoph Berg wrote: > > Re: Raphael Hertzog > > > I think it would be nice if that operation could be automated. > > > With dpkg triggers, it's easy to schedule a script on the postgresql > > > package side when libc6 (or locales?) gets upgraded. We can record the > > > libc6 version at installation time, and compare the version in the trigger > > > run, and if the major version has changed, then we run the required > > > ALTER DATABASE commands. > > > > The correct default action is to reindex all text indexes. ALTER > > DATABASE is just a shortcut for when you know that the collation has > > not changed. > > How can we determine if the collation information has changed between > two glibc releases? (cc Aurélien in case he knows)
I don't think there is an easy way to determine that. On the other hand, I think it's safe to assume that the collation information only changes for an upstream release, not for a debian revision. For a new upstream release, most of the time most of the locales do not see any collation change, but there is almost always at least one locale with collation changes (although that was not true for glibc 2.41). Regards Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://aurel32.net