Re: gai_strerror() is not thread-safe on Windows

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers@postgresql.org
Date: 2024-02-11T22:25:53Z
Lists: pgsql-hackers
On Tue, Jan 16, 2024 at 8:52 AM Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Dec 6, 2023 at 8:45 PM Kyotaro Horiguchi
> <horikyota.ntt@gmail.com> wrote:
> > > So I think we should just hard-code the error messages in English and
> > > move on.  However, English is my language so perhaps I should abstain
> > > and leave it to others to decide how important that is.
> >
> > I also think that would be a good way.
>
> Considering this remark from Kyotaro Horiguchi, I think the
> previously-posted patch could be committed.
>
> Thomas, do you plan to do that, or are there outstanding issues here?

Pushed.  I went with FreeBSD's error messages (I assume it'd be OK to
take glibc's too under fair use but I didn't want to think about
that).



Commits

  1. Fix gai_strerror() thread-safety on Windows.

  2. Update comment, generation mem contexts have a "keeper" block

  3. Remove replacement code for getaddrinfo.