Re: Collation again here

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: Rihad <grihad(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Collation again here
Date: 2026-01-08 12:48:58
Message-ID: CAFCRh--H4a9kV4R=22DB6cL+KxcJ3A6-3tg_Y77KgTdDJECBwA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 8, 2026 at 1:39 PM Rihad <grihad(at)gmail(dot)com> wrote:
> Hi, guys. Just pg_upgraded our PG from 13.x to 18.1, rebuilt all indexes concurrently and issued ALTER DATABASE foo REFRESH COLLATION VERSION
> Everything's fine on the master server, no warnings etc. Then I set up a replica using pg_basebackup, and there when trying to access the DB using psql I get:
>
> WARNING: database "foo" has a collation version mismatch
> DETAIL: The database was created using collation version 43.0, but the operating system provides version 34.0.
> HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE foo REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
> The OS are both FreeBSD, but the master runs 14.3, the replica runs 13.5. PostgreSQL packages are built with ICU support by default, the versions used are identical: icu-76.1
> Could it be that the OS (libc) needs to be the same version? I hoped it would be enough to use the same ICU.

Depends what Provider you used in those DBs:
https://stream.boxwatch.ru/docs/current/locale.html#LOCALE-PROVIDERS
Having the same ICU is good, but do your DBs use that provider? If
not, and you're using the libc one, then yes, the libc version
matters.
Myself I use the new builtin provider to avoid OS portability issues. --DD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rihad 2026-01-08 13:18:53 Re: Collation again here
Previous Message Rihad 2026-01-08 12:34:40 Collation again here