Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Bryan Green <dbryan(dot)green(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows
Date: 2025-12-11 14:43:36
Message-ID: 7a029e51-872a-4baf-b846-a17a97e57777@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10.12.25 01:45, Bryan Green wrote:
> The attached patch takes a pragmatic approach: for gettext 0.20.1+, we
> avoid triggering the bug by using Windows locale format instead of
> calling IsoLocaleName(). This works because gettext 0.20.1+ internally
> converts the Windows format back to POSIX for catalog lookups, whereas
> 0.19.8 and earlier need POSIX format directly.

I can confirm that this patch fixes the performance deviation from
activating --enable-nls on Windows (tested with MSYS2/UCRT64).

I wonder, this change that gettext did with the locale naming, does that
also affect what guidance we need to provide to users about how to
configure locale names? For example, on a Unix-ish system, a user can
do something like initdb ... --lc-messages=de_DE. What locale name
format do you need to use on Windows to get the translations to
activate? Does this also depend on the gettext version?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-12-11 14:50:47 Re: Solaris versus our NLS files
Previous Message Dilip Kumar 2025-12-11 14:19:29 Re: Proposal: Conflict log history table for Logical Replication