pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: Robert Sjöblom <robert.sjoblom@fortnox.se>
To: pgsql-general@lists.postgresql.org
Subject: Re: glibc initdb options vs icu compatibility questions (PG15)
Date: Mon, 16 Jan 2023 10:47:54 -0500
Message-ID: <fc4d9f99-acaa-0a62-52e1-35f9846a6834@joeconway.com> (raw)
In-Reply-To: <fbb954bb3aed7f31200320d55b66abd6c214eb57.camel@cybertec.at>
References: <1e8c876d-a719-c7c3-c71f-c6d527239fe8@fortnox.se>
	<fbb954bb3aed7f31200320d55b66abd6c214eb57.camel@cybertec.at>

On 1/16/23 08:26, Laurenz Albe wrote:
> On Mon, 2023-01-16 at 09:30 +0100, Robert Sjöblom wrote:
>> We have a fleet of postgres 10 servers (1 primary, 2 replicas) that 
>> we're now planning to upgrade. We've historically been forced to use the 
>> same distro (centos7) and libc version, or rely on pg_dump/restore, 
>> across pg versions due to the fact that the servers/databases were 
>> initialized with the following options:
>> --lc-collate=sv_SE.UTF-8
>> 
>> We're upgrading all servers to pg15 through logical replication, and 
>> with that we'd like to remove our dependency on any specific libc 
>> version (to avoid corruption issues etc). We hope to do this by 
>> initializing our pg15 clusters with swedish icu locale 
>> (--icu-locale=sv-SE-x-icu). By using icu like this, we should have the 
>> same sorting behavior as the pg10 servers have today? By our 
>> understanding, we then should be able to use physical replication across 
>> different OS versions, without worrying about index corruption etc?
>> 
>> According to 
>> http://peter.eisentraut.org/blog/2022/09/26/icu-features-in-postgresql-15, 
>> we still need to set a regular libc locale/option; does this mean that 
>> the dependency on libc is still present as it pertains to corruption 
>> issues and being forced to use the same libc version across all replicas?
> 
> I'd say no.  The problem is the collation, and for that, the ICU
> collation will be used.

check

> The libc locale is for other aspects of locale.

Although I am not aware of any specific/known issues, keep in mind that 
there is still a possibility of changes across major glibc versions for 
things affected by LC_CTYPE, LC_TIME, LC_MONETARY, and LC_NUMERIC - 
lower()/upper() for example.

-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






view thread (3+ messages)

Message-ID: <fc4d9f99-acaa-0a62-52e1-35f9846a6834@joeconway.com>
Permalink:  ../fc4d9f99-acaa-0a62-52e1-35f9846a6834@joeconway.com/
Also on:    postgresql.org/message-id/fc4d9f99-acaa-0a62-52e1-35f9846a6834@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mail@joeconway.com, laurenz.albe@cybertec.at, robert.sjoblom@fortnox.se
  Subject: Re: glibc initdb options vs icu compatibility questions (PG15)
  In-Reply-To: <fc4d9f99-acaa-0a62-52e1-35f9846a6834@joeconway.com>
  References: <1e8c876d-a719-c7c3-c71f-c6d527239fe8@fortnox.se> <fbb954bb3aed7f31200320d55b66abd6c214eb57.camel@cybertec.at> <fc4d9f99-acaa-0a62-52e1-35f9846a6834@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox