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 1pgI1Q-0000xG-37 for pgsql-admin@arkaria.postgresql.org; Sun, 26 Mar 2023 04:30:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pgI1N-0003QU-Cp for pgsql-admin@arkaria.postgresql.org; Sun, 26 Mar 2023 04:30:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgI1M-0003QK-No for pgsql-admin@lists.postgresql.org; Sun, 26 Mar 2023 04:30:20 +0000 Received: from mout-u-107.mailbox.org ([80.241.59.207]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgI1F-00073t-SU for pgsql-admin@lists.postgresql.org; Sun, 26 Mar 2023 04:30:19 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4PkjfS1zfZz9sQ2; Sun, 26 Mar 2023 06:30:08 +0200 (CEST) Date: Sun, 26 Mar 2023 06:30:06 +0200 (CEST) From: Erik Wienhold To: Matt Gibbins Cc: pgsql-admin@lists.postgresql.org Message-ID: <1970524333.377932.1679805006974@office.mailbox.org> In-Reply-To: <7429705a-e70f-03d5-9ef3-c60d86d65786@fastmail.com.au> References: <93809259-173b-9bf0-acb8-d6e0b5c06b87@fastmail.com.au> <1684230080.452693.1679762358599@office.mailbox.org> <7429705a-e70f-03d5-9ef3-c60d86d65786@fastmail.com.au> Subject: Re: Debian PostgreSQL 15 pg_createcluster - could not open collator for locale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4PkjfS1zfZz9sQ2 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 26/03/2023 00:06 CET Matt Gibbins wrote= : > > The version currently installed as identified from dpkg -l is. > > Desired=3DUnknown/Install/Remove/Purge/Hold > | > Status=3DNot/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig= -pend > |/ Err?=3D(none)/Reinst-required (Status,Err: uppercase=3Dbad) > ||/ Name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Vers= ion=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Architecture Description > > +++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > ii=C2=A0 libicu67:amd64 67.1-7=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 amd64= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 International Components > for Unicode > > The ls command returns. > > lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 18 Jul=C2=A0 1= =C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicudata.so.67 -> libicudata.so.67.1 > -rw-r--r-- 1 root root 28407344 Jul=C2=A0 1=C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicudata.so.67.1 > lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 18 Jul=C2=A0 1= =C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicui18n.so.67 -> libicui18n.so.67.1 > -rw-r--r-- 1 root root=C2=A0 3160560 Jul=C2=A0 1=C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicui18n.so.67.1 > lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 16 Jul=C2=A0 1= =C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicuio.so.67 -> libicuio.so.67.1 > -rw-r--r-- 1 root root=C2=A0=C2=A0=C2=A0 55456 Jul=C2=A0 1=C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicuio.so.67.1 > lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 18 Jul=C2=A0 1= =C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicutest.so.67 -> libicutest.so.67.1 > -rw-r--r-- 1 root root=C2=A0=C2=A0=C2=A0 81400 Jul=C2=A0 1=C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicutest.so.67.1 > lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 16 Jul=C2=A0 1= =C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicutu.so.67 -> libicutu.so.67.1 > -rw-r--r-- 1 root root=C2=A0=C2=A0 211880 Jul=C2=A0 1=C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicutu.so.67.1 > lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 16 Jul=C2=A0 1= =C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicuuc.so.67 -> libicuuc.so.67.1 > -rw-r--r-- 1 root root=C2=A0 1988784 Jul=C2=A0 1=C2=A0 2021 > /usr/lib/x86_64-linux-gnu/libicuuc.so.67.1 > > Information obtained from 'apt-cache policy libicu67'. > > libicu67: > =C2=A0 Installed: 67.1-7 > =C2=A0 Candidate: 67.1-7 > =C2=A0 Version table: > =C2=A0*** 67.1-7 500 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 500 http://mirror.linux.org.a= u/debian bullseye/main amd64 Packages > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 100 /var/lib/dpkg/status Same output as for me. Would you please build icu-test from the following source and run it with locale "yue-Hans". Let's see if ucol_open fails with U_INVALID_FORMAT_ERRO= R in this case. There are only two functions in Postgres that call ucol_open and emit error message "could not open collator for locale" for ICU >=3D54: =09initdb.c:check_icu_locale =09pg_locale.c:pg_ucol_open (called by pg_import_system_collations) File icu-test.c: =09#include =09 =09#include =09#include =09 =09int main(int argc, char** argv) { =09 if (argc < 2) { =09 fprintf(stderr, "usage: %s LOCALE\n", argv[0]); =09 return 1; =09 } =09 =09 const char *test_locale =3D argv[1]; =09 =09 printf("version =3D %s\n", U_ICU_VERSION); =09 =09 UErrorCode status =3D U_ZERO_ERROR; =09 UCollator *coll =3D ucol_open(test_locale, &status); =09 printf("ucol_open\n status =3D %s\n", u_errorName(status)); =09 =09 if (U_SUCCESS(status)) { =09 const char *valid_locale =3D ucol_getLocaleByType(coll, ULOC_VALID_L= OCALE, &status); =09 printf("ucol_getLocaleByType\n status =3D %s\n locale =3D %s\n", =09 u_errorName(status), valid_locale); =09 } =09 =09 ucol_close(coll); =09} Build and test: =09apt-get install build-essential pkg-config libicu-dev =09gcc -o icu-test icu-test.c $(pkg-config --cflags --libs icu-i18n) =09./icu-test yue-Hans I get the following on Debian Bullseye: =09version =3D 67.1 =09ucol_open =09 status =3D U_USING_FALLBACK_WARNING =09ucol_getLocaleByType =09 status =3D U_USING_FALLBACK_WARNING =09 locale =3D zh_Hans -- Erik