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

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-12-04T19:26:54Z
Lists: pgsql-hackers

Attachments

On second thoughts, I guess it would make more sense to use the exact
messages Windows' own implementation would return instead of whatever
we had in the past (probably cribbed from some other OS or just made
up?).  I asked CI to spit those out[1].  Updated patch attached.  Will
add to CF.

[1] https://cirrus-ci.com/task/5816802207334400?logs=main#L15

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.