pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add option to use ICU as global locale provider
Date: Fri, 18 Mar 2022 11:12:44 +0800
Message-ID: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> (raw)
In-Reply-To: <YjPn5+Y9Gj58PlEW@paquier.xyz>
References: <E1nUnH5-0006aR-MX@gemulon.postgresql.org>
	<YjPn5+Y9Gj58PlEW@paquier.xyz>

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.





view thread (22+ messages)  latest in thread

Message-ID: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud>
Permalink:  ../20220318031244.tu3wwlyxxabzq3iu@jrouhaud/
Also on:    postgresql.org/message-id/20220318031244.tu3wwlyxxabzq3iu@jrouhaud

 · 

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-committers@postgresql.org
  Cc: rjuju123@gmail.com, michael@paquier.xyz, peter@eisentraut.org
  Subject: Re: pgsql: Add option to use ICU as global locale provider
  In-Reply-To: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud>
  References: <E1nUnH5-0006aR-MX@gemulon.postgresql.org> <YjPn5+Y9Gj58PlEW@paquier.xyz> <20220318031244.tu3wwlyxxabzq3iu@jrouhaud>

* 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