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: 2026-02-16 15:34:51
Message-ID: e619ee03-1bc4-42f1-857e-7769d6967520@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2026-02-16 15:44:03 Re: index prefetching
Previous Message Anthonin Bonnefoy 2026-02-16 15:30:45 Re: Fix uninitialized xl_running_xacts padding