Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows
Date
Msg-id e619ee03-1bc4-42f1-857e-7769d6967520@eisentraut.org
Whole thread Raw
In response to Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows  (Bryan Green <dbryan.green@gmail.com>)
Responses Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows
List pgsql-hackers
On 04.02.26 16:08, Bryan Green wrote:
> On 1/20/2026 2:39 PM, Peter Eisentraut wrote:
>> On 08.01.26 15:57, Bryan Green wrote:
>>> I agree with the above changes and have implemented them, including the
>>> correction to the cutoff version.  But, before sharing the patch with
>>> those changes I think we should discuss 1) should we short-circuit
>>> C/POSIX and not ever call gettext in that case,
>>
>> You had written that you had submitted a patch to gettext to handle that
>> there.  Has that gotten anywhere?
>>
>>> 2) should we try to
>>> convert "ISO" to Windows legacy format.
>>
>> I don't know.  We can just tell users to set their locale in the right
>> format.
> Peter,
> I have attached the patch with the changes you suggested/requested.  The
> patch was added to gnulib in December.  The latest release of gnu
> gettext (1.0) does include the patch.  Yes, they jumped from 0.26 to 1.0.

The newly released gettext 1.0 is now available in MSYS2, so I tested 
this again.  The new gettext indeed makes a significant performance 
improvement compared to my test results with earlier gettext versions 
(about 10x faster).

This is all without any PostgreSQL patch.

But when I apply your patch, it actually makes things worse (by about 
25%).  This is incomprehensible to me, but it's very reproducible.  I'm 
not sure how to proceed now.




pgsql-hackers by date:

Previous
From: Anthonin Bonnefoy
Date:
Subject: Re: Fix uninitialized xl_running_xacts padding
Next
From: Tomas Vondra
Date:
Subject: Re: index prefetching