Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHRiL-0008TX-PA for pgsql-general@arkaria.postgresql.org; Mon, 16 Jan 2023 15:48:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHRiK-0005Vh-Gd for pgsql-general@arkaria.postgresql.org; Mon, 16 Jan 2023 15:48:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHRiK-0005VY-5r for pgsql-general@lists.postgresql.org; Mon, 16 Jan 2023 15:48:00 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pHRiH-0000uj-Dn for pgsql-general@lists.postgresql.org; Mon, 16 Jan 2023 15:47:59 +0000 Received: by mail-qt1-x82d.google.com with SMTP id q15so1016539qtn.0 for ; Mon, 16 Jan 2023 07:47:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; h=content-transfer-encoding:in-reply-to:subject:from:references:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=zhGek8HKo8eFuldmQzez7qmj5/ZOwDsFLNOgHqep9YU=; b=V+olkitxMaSL1bwj8GT4J0McgMKXCEHBKMJAAoVgkDUpyM8I/1v6+6eCEvvrxeVVQe KTvLDuWox4CTMIFxI+/30jeaG9X5sGGEel3+iLDZDxSSuXXbmCN1PSZRGunxwLE8lxta nF5JAhupmfDAVSs6YjL520rU1DNESIh7LRkI592OkU1P+WQAz4LAgObm8R3tEEumGHSK 7b2ri7Dfc4XmKnwF5NbtP8/P+66rGyqIT1KS0lbC/HgOgAeMJP3blSlRBubiR9HJP9L2 uy70xMfRSweFGRegp9Cvl2lsH0dfq63zLAry2NUzlVxbNxsjX1Z9SxSRNl5T3LyYpJAR z43A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zhGek8HKo8eFuldmQzez7qmj5/ZOwDsFLNOgHqep9YU=; b=zNb6UJvgv1VXrtncrvJxxWusj0s24JzGBwux3LhDR6O3z/9mWqLZSApcYnQ9NMIcLR Qg1dECvoxQj1rPJy2m3euNKlwGCKDDhXqhc82VtYCgHg9/MuXY4PCa3auG7V6ohUCGtM Uaq8/erRGhA7KlNVZr5F+ybua69WOeBupvsvX7pYIDLyX+CmMFnNU5nMKPn6qQZzXRui YWA+WRW1kAasreqIZwY7XSrJYddGWTTyEUKkw4JQG4F1gAJWvlZUhI4SsO4eWOlWV0oG IHy5zXDBvhBM0Dp0o1iMK8J18M3Gg+Dmf0qXkaVf+kKnQOYIvhU7ESv5/HjM1NN3Yedk Wo3w== X-Gm-Message-State: AFqh2ko990hMig2DpU1B1t0kjcTOB3oxALPFII1prddaC35ugF9XlBRV txDUJLGVixo3zPJluZrvK6zftQ== X-Google-Smtp-Source: AMrXdXsSFfDxAPV/DMWush+TzoDMQD9mu9vw5kyUzW7DFfcnFjoF2LCUx9rGBB5Q9DVzb+SATiN1yw== X-Received: by 2002:a05:622a:1b11:b0:3a8:10c4:4ae with SMTP id bb17-20020a05622a1b1100b003a810c404aemr116440295qtb.49.1673884075620; Mon, 16 Jan 2023 07:47:55 -0800 (PST) Received: from [192.168.4.41] (162-239-31-113.lightspeed.dybhfl.sbcglobal.net. [162.239.31.113]) by smtp.gmail.com with ESMTPSA id a3-20020a05620a438300b007065b5e19c7sm2685881qkp.25.2023.01.16.07.47.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Jan 2023 07:47:55 -0800 (PST) Message-ID: Date: Mon, 16 Jan 2023 10:47:54 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: Laurenz Albe , =?UTF-8?Q?Robert_Sj=c3=b6blom?= , pgsql-general@lists.postgresql.org References: <1e8c876d-a719-c7c3-c71f-c6d527239fe8@fortnox.se> From: Joe Conway Subject: Re: glibc initdb options vs icu compatibility questions (PG15) In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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