OS system version upgrade (glibc / libicu version change)
OS system version upgrade (glibc / libicu version change)
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/18/collation.html Description: Hi, Team ! It looks like the PostgreSQL documentation doesn't explain the customers what to do with PostgreSQL in case of OS system version upgrade or/and glibc / libicu version change. There're many links/blogs available where the required actions are explained. https://knowledge.enterprisedb.com/hc/en-us/articles/13520015051420-glibc-locale-data-changes https://www.crunchydata.com/blog/postgres-migration-pitstop-collations https://wiki.postgresql.org/wiki/Locale_data_changes The thing is some of the recommendations are not complete or/and not up-to-date. I see a lot of confusion in the field about this topic, because PostgreSQL users don't have the 'official recommendations' from the PostgreSQL community. So, my proposal to dedicate a chapter in the PostgreSQL documentation about the topic. best regards Alexey Shishkin
Re: OS system version upgrade (glibc / libicu version change)
best regards,
Alexey Shishkin
Alexey Shishkin Technical Account Manager EDB Software GmbH alexey.shishkin@enterprisedb.com
|
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/collation.html
Description:
Hi, Team !
It looks like the PostgreSQL documentation doesn't explain the customers
what to do with PostgreSQL in case of OS system version upgrade or/and glibc
/ libicu version change.
There're many links/blogs available where the required actions are
explained.
https://knowledge.enterprisedb.com/hc/en-us/articles/13520015051420-glibc-locale-data-changes
https://www.crunchydata.com/blog/postgres-migration-pitstop-collations
https://wiki.postgresql.org/wiki/Locale_data_changes
The thing is some of the recommendations are not complete or/and not
up-to-date.
I see a lot of confusion in the field about this topic, because PostgreSQL
users don't have the 'official recommendations' from the PostgreSQL
community.
So, my proposal to dedicate a chapter in the PostgreSQL documentation about
the topic.
best regards
Alexey Shishkin
Re: OS system version upgrade (glibc / libicu version change)
best regards,
Alexey Shishkin
Alexey Shishkin Technical Account Manager EDB Software GmbH alexey.shishkin@enterprisedb.com
|
Planned PTO: Nov-04 - Nov-08
Hi, Team !Any ideas regarding my proposal ?My recent experience is about the customers migrating from RHEL8 to RHEL10 and from SLES12 to SLES15 and they don't have the answers from PostgreSQL documentation.
best regards,
Alexey Shishkin
Alexey Shishkin
Technical Account Manager
EDB Software GmbH
alexey.shishkin@enterprisedb.com
On Mon, Feb 2, 2026 at 10:08 AM PG Doc comments form <noreply@postgresql.org> wrote:The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/collation.html
Description:
Hi, Team !
It looks like the PostgreSQL documentation doesn't explain the customers
what to do with PostgreSQL in case of OS system version upgrade or/and glibc
/ libicu version change.
There're many links/blogs available where the required actions are
explained.
https://knowledge.enterprisedb.com/hc/en-us/articles/13520015051420-glibc-locale-data-changes
https://www.crunchydata.com/blog/postgres-migration-pitstop-collations
https://wiki.postgresql.org/wiki/Locale_data_changes
The thing is some of the recommendations are not complete or/and not
up-to-date.
I see a lot of confusion in the field about this topic, because PostgreSQL
users don't have the 'official recommendations' from the PostgreSQL
community.
So, my proposal to dedicate a chapter in the PostgreSQL documentation about
the topic.
best regards
Alexey Shishkin
Re: OS system version upgrade (glibc / libicu version change)
On Tue, 2026-10-27 at 09:49 +0100, Alexey Shishkin wrote: > > > It looks like the PostgreSQL documentation doesn't explain the customers > > > what to do with PostgreSQL in case of OS system version upgrade or/and glibc > > > / libicu version change. > > > > > > So, my proposal to dedicate a chapter in the PostgreSQL documentation about > > > the topic. > > Any news about the subject ? > > I think it's the right time to prepare such chapter in order to have it in PG19 documentation. It might be a little late for v19, but not for v20. I agree that it might be good to have some mention of this in the documentation, but I am not sure what would be a good place. On the one hand, this could be somewhere under "Localization", but I guess that nobody would look for it there. A good place could be a chapter in "Server Setup and Operation", and my personal recommendation is to create clusters with the C locale. If you want to get that moving, how about proposing a patch? Yours, Laurenz Albe
Re: OS system version upgrade (glibc / libicu version change)
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
- 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.
Pls. feel free to propose the changes to this structure.
best regards,
Alexey Shishkin
Alexey Shishkin Technical Account Manager EDB Software GmbH alexey.shishkin@enterprisedb.com
|
Planned PTO: Nov-04 - Nov-08
On Tue, 2026-10-27 at 09:49 +0100, Alexey Shishkin wrote:
> > > It looks like the PostgreSQL documentation doesn't explain the customers
> > > what to do with PostgreSQL in case of OS system version upgrade or/and glibc
> > > / libicu version change.
> > >
> > > So, my proposal to dedicate a chapter in the PostgreSQL documentation about
> > > the topic.
>
> Any news about the subject ?
>
> I think it's the right time to prepare such chapter in order to have it in PG19 documentation.
It might be a little late for v19, but not for v20.
I agree that it might be good to have some mention of this
in the documentation, but I am not sure what would be a good
place. On the one hand, this could be somewhere under
"Localization", but I guess that nobody would look for it there.
A good place could be a chapter in "Server Setup and Operation",
and my personal recommendation is to create clusters with the
C locale.
If you want to get that moving, how about proposing a patch?
Yours,
Laurenz Albe
Re: OS system version upgrade (glibc / libicu version change)
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
Re: OS system version upgrade (glibc / libicu version change)
best regards,
Alexey Shishkin
Alexey Shishkin Technical Account Manager EDB Software GmbH alexey.shishkin@enterprisedb.com
|
Planned PTO: Nov-13 - Nov-15, Nov-21 - Nov-23
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
Re: OS system version upgrade (glibc / libicu version change)
On Mon, 2026-11-16 at 13:00 +0100, Alexey Shishkin wrote: > 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 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. Sure. You write a documentation patch, submit it to this list, and I am happy to review it. I suggest that the patch should not be too big. Code samples and instructions for repair would be too much in my opinion. I'd say that the objective is to alert the reader to the problem and tell him or her to rebuild affected indexes with REINDEX, and to use amcheck to check if indexes are ok. Yours, Laurenz Albe