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 1nV8tu-0004rZ-4X for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Mar 2022 09:28:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nV8tt-000137-28 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Mar 2022 09:28:01 +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 1nV8ts-00011W-LZ for pgsql-hackers@lists.postgresql.org; Fri, 18 Mar 2022 09:28:00 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nV8tq-0002lF-A6 for pgsql-hackers@lists.postgresql.org; Fri, 18 Mar 2022 09:28:00 +0000 Received: by mail-pl1-x62f.google.com with SMTP id n15so6570109plh.2 for ; Fri, 18 Mar 2022 02:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bLOQaHArJf+QvEaQzFlRkiK0H5YhtRuxNnWhIhogZng=; b=FvMmvpKLzaeOtrLHKP8oF4YrlIrTmcqwl4uzeeuEx0F5s/4j+CtRvxTYoki7C03xst FJNznsd/27wgORgQqyKfIIzopB31rPynTLjSxqHU/C0MLQo622JepNSmR8OMyPLupq9e sbWnuvUh5tlrThgvRkTnV/CGEkX6LDsdtXhtaH/5EzPxG4tBlKXMsz8LhQ1v5958d2Lr FCOILbHWMht6XCrW1oQ+Eq7NC5RxEVG4EXiYu7GNr/LiretJUTxmvyOdnRg2PUY/CEWp fwEItN788wO6xq2brFO4ZgQHVOae4MVpkhTxn9tNdGcZccAelcQpKnxHmLabNpnbnmEZ QmLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bLOQaHArJf+QvEaQzFlRkiK0H5YhtRuxNnWhIhogZng=; b=FEuf7Mv70AoutSXwR1bK0kK7B8DWlfe1wBzhD9GH6sOIdD/9M3e9v19XNAAMv7cNav J23FLHhxEUsh0KnK0TWrqrQ3KEkWNSOXECUEk4cMHt6kDhCXMZwuN49ecoEQYDbUwe6v feSAtOIUXNLjYhK3Id62r/8WMBu4y4PvKiYnD6S3Z3Nsa0ogcbyymdengx/L7Fcc4GuT ajPo2TAyJrMImovOOaVvldogUeKFfUR9iuS6aUnMKUyJuwtEuNn7h/hJLfjsdBvR01aB ENFSVoy5snaDXAPXVSm4WT4XJd3aA6fn42kU+E8M+2PufMlBi2ogV5j0MPw6fggct1Dg /FFA== X-Gm-Message-State: AOAM530XKd14rgBgBc98EAB9w5qvnD/RZx+924qMbivSaJlHkJq7vdsy 0/8h3iqzx1TBqVonPjVINws= X-Google-Smtp-Source: ABdhPJyCAzvXi2+q+ynIoYQ5k0zFQNZaIaajDmHVkSUFB51u+2H3v8L7nA4O7YRP2Sd1l3t3YU+3zQ== X-Received: by 2002:a17:902:8d8f:b0:153:6546:2530 with SMTP id v15-20020a1709028d8f00b0015365462530mr9256686plo.81.1647595676091; Fri, 18 Mar 2022 02:27:56 -0700 (PDT) Received: from jrouhaud (2001-b011-1005-9591-25eb-5898-3273-93a3.dynamic-ip6.hinet.net. [2001:b011:1005:9591:25eb:5898:3273:93a3]) by smtp.gmail.com with ESMTPSA id d4-20020a17090ad3c400b001c65ba76911sm7283748pjw.3.2022.03.18.02.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 02:27:54 -0700 (PDT) Date: Fri, 18 Mar 2022 17:27:49 +0800 From: Julien Rouhaud To: Thomas Munro Cc: Michael Paquier , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Add option to use ICU as global locale provider Message-ID: <20220318092749.363m4uv6rq24lctz@jrouhaud> References: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> <20220318063648.4ja6rxlyzvc3viio@jrouhaud> <20220318074051.n46mkwp2zkbxeesf@jrouhaud> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="m4ycfp7bbeuwbyuj" Content-Disposition: inline In-Reply-To: <20220318074051.n46mkwp2zkbxeesf@jrouhaud> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --m4ycfp7bbeuwbyuj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline (moving to -hackers) On Fri, Mar 18, 2022 at 03:40:51PM +0800, Julien Rouhaud wrote: > On Fri, Mar 18, 2022 at 02:36:48PM +0800, Julien Rouhaud wrote: > > On Fri, Mar 18, 2022 at 06:15:47PM +1300, Thomas Munro wrote: > > > > > > No idea what's happening here but one observation is that that animal > > > is running an older distro that shipped with ICU 5.0. Commit b8f9a2a6 > > > may hold a clue... > > > > Right. I'm setting up a similar podman environment, hopefully more info soon. > > And indeed b8f9a2a6 is the problem. We would need some form of > icu_set_collation_attributes() on the frontend side if we want to detect such a > problem on older ICU version at the expected moment rather than when > bootstrapping the info. A similar check is also needed in createdb(). I'm attaching a patch that fixes both issues for me with ICU 50. Note that there's already a test that would have failed for CREATE DATABASE if initdb tests didn't fail first, so no new test needed. I ended up copy/pasting icu_set_collation_attributes() in initdb.c. There shouldn't be new attributes added in old ICU versions, and there are enough differences to make it work in the frontend that it didn't seems worth to have a single function. --m4ycfp7bbeuwbyuj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-Fix-global-icu-collations-for-ICU-54.patch"