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 1nV32v-0002nm-VJ for pgsql-committers@arkaria.postgresql.org; Fri, 18 Mar 2022 03:12:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nV32t-00075T-Ce for pgsql-committers@arkaria.postgresql.org; Fri, 18 Mar 2022 03:12:55 +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 1nV32t-00075J-4B for pgsql-committers@lists.postgresql.org; Fri, 18 Mar 2022 03:12:55 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nV32q-00086M-DE for pgsql-committers@lists.postgresql.org; Fri, 18 Mar 2022 03:12:54 +0000 Received: by mail-pg1-x533.google.com with SMTP id 6so4144292pgg.0 for ; Thu, 17 Mar 2022 20:12:51 -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=7VvY3SEj9WTlK5sEWju+vpd8C+SFuHbxcE6l4tKcczE=; b=DPcitA8ckrjQGj3Y36TANiVG9T9G30jL8EFBXoQuMg2Fq1hyd/v4/uFm7MB8VcusRR dRwJItP57+MSczIIzR6VDbmpIm5WDGW+vooWqPLUCQOQNFKFgyfPc5rTY+0Po3etH7K+ ftGb+oqx2bwTzOPVQjPbTltjJ6ckp3BfkUnpRcM8i+XvVvusympCn0N3ymOHVWk7HWkj zQz1usbw0ZjwbnT2yr8QmtUiAjgSZPdyW6JaW/oiKy1wd8D+DWuzfZ6jpAyXG+doBhRS ajhjaYYPPq9Qnr5SAzK8hIG/B+spIp4+AqiIXFqsTqDDPXV5QI07Xjorg41emxokr0uS MCjQ== 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=7VvY3SEj9WTlK5sEWju+vpd8C+SFuHbxcE6l4tKcczE=; b=dy84B9orGBGKMwJnYnLIbPAN4OdEKXA0XRXWZilDNHutVeAm1UMgKWjGvnRjm4hxxU FhkvS+02YtOfRLJaBVqKMtezOQnWz5LVZrR76DI7S2cmd6b22clLkDaNWKSOKBpr9SqZ xgvnMH8An9voX8D1slBiTWVuyQmyIB1xqzJC1Xj4hLrhL1Nnmk9O8bIdIdxHAePykJGt VDGEdxH9QkcrxDlbYPFlnplx4uWKYiAqOaqmsI66nJpxPJPFWQ84fLTbIORfcTd2fg+T 09wYPqOalk5KJhaPvplxM3YcsY5RqD0naVYNuh2eu+vMCUv2w99FCJVNNitrTpmvsQDN MExw== X-Gm-Message-State: AOAM533tvCt/VSMb5AEfRsh138zvdbnI43oyZQI2g5nbsLriJswSGd/J x28m37Xja/Q8trTpd7R1C3r10UtMRBY= X-Google-Smtp-Source: ABdhPJyBYS56CTOD4vkGHPjKTf5xWevLUr6Yv+OtMnfa5iMyooBP+GI1WfvlkLuXnauHx5P1h9dIYA== X-Received: by 2002:a65:57ca:0:b0:381:ea8d:4d1f with SMTP id q10-20020a6557ca000000b00381ea8d4d1fmr6384415pgr.143.1647573169190; Thu, 17 Mar 2022 20:12:49 -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 l2-20020a637c42000000b003644cfa0dd1sm6237831pgn.79.2022.03.17.20.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 20:12:48 -0700 (PDT) Date: Fri, 18 Mar 2022 11:12:44 +0800 From: Julien Rouhaud To: Michael Paquier Cc: Peter Eisentraut , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add option to use ICU as global locale provider Message-ID: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Fri, Mar 18, 2022 at 11:01:11AM +0900, Michael Paquier wrote: > > FYI, prion is complaining here: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2022-03-18%2001%3A43%3A13 > > Some details: > # Failed test 'fails for invalid ICU locale: matches' > # at t/001_initdb.pl line 107. > # '2022-03-18 01:54:58.563 UTC [504] FATAL: could > # not open collator for locale "@colNumeric=lower": > # U_ILLEGAL_ARGUMENT_ERROR That's very strange, apparently initdb doesn't detect any problem when checking ucol_open() for initial checks, since it's expecting: # doesn't match '(?^:initdb: error: could not open collator for locale)' but then postgres in single-backend mode does detect the problem, with the exact same check, so it's not like --icu-locale=@colNumeric=lower wasn't correctly interpreted. Unfortunately we don't have the full initdb output, so we can't check what setup_locale_encoding reported. The only difference is that in initdb's setlocale(), the result of ucol_open is discarded, maybe the compiler is optimizing it away for some reason, even though it seems really unlikely. That being said, we could save the result and explicitly close the collator. That wouldn't make much difference in initdb (but may be a bit cleaner), but I see that there's a similar coding in createdb(), which seems like it could leak some memory according to ucol_close man page.