Re: Thread-safe nl_langinfo() and localeconv() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Thread-safe nl_langinfo() and localeconv()
Date
Msg-id ddcb47f2-842e-4e80-9ab6-f4d7427c5df7@eisentraut.org
Whole thread Raw
In response to Re: Thread-safe nl_langinfo() and localeconv()  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Thread-safe nl_langinfo() and localeconv()
Re: Thread-safe nl_langinfo() and localeconv()
List pgsql-hackers
On 27.03.25 11:16, Peter Eisentraut wrote:
>> Patch 0002 also looks okay, except that the error handling could be 
>> unified with existing code, as I had previously pointed out.  Patch 
>> 0005 fixes that.
> 
> I plan to commit this one next, after the above had a bit of time to stew.

also done

>> About patch 0003:
>>
>> I had previously pointed out that the canonicalization might have been 
>> intentional, and that we have canonicalization of ICU locale names.  
>> But we don't have to keep the setlocale()-based locale checking 
>> implementation just for that, I think.  (If this was meant to be a 
>> real feature offered by libc, there should be a 
>> get_locale_name(locale_t) function.)

> Anyway, this patch fails tests on CI on NetBSD, so it will need some 
> further investigation.

It turns out the problem was that nl_langinfo_l() returns a codeset name 
of "646" for the C locale, which we didn't have in our mapping table. 
If we add that, then everything passes there as well.  (But the use of 
nl_langinfo_l() wasn't added by this patch, it just exposes it to the 
tests.  So this is apparently a pre-existing problem.)

Attached are the remaining patches in this series.

Attachment

pgsql-hackers by date:

Previous
From: "Maksim.Melnikov"
Date:
Subject: Re: sync_standbys_defined read/write race on startup
Next
From: Alexander Pyhalov
Date:
Subject: Re: MergeAppend could consider sorting cheapest child path