Re: BUG #18312: libpq: PQsetdbLogin() not thread-safe
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christian Maurer <c.maurer@gmx.at>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2024-02-02T18:19:42Z
Lists: pgsql-bugs
Attachments
- avoid-concurrent-bindtextdomain-calls-wip.patch (text/x-diff) patch
Christian Maurer <c.maurer@gmx.at> writes: >> I wondered whether we needed to introduce a critical section >> to prevent multiple threads from calling that concurrently, >> even though its docs allege you shouldn't have to. Perhaps >> it's thread-safe except on Windows? > This would explain, why I could not reproduce the error on Red Hat Enterprise Linux. Are you in a position to try a source-code patch? The attached is very quick-and-dirty, but if it resolves your problem then we could turn it into something respectable. regards, tom lane
Commits
-
Avoid concurrent calls to bindtextdomain().
- a584d03ced5f 17.0 landed
- 9fb1396a96bd 12.19 landed
- 8ead39e3895e 14.12 landed
- 8c5da20db298 13.15 landed
- 806f98951511 15.7 landed
- 52afe563206e 16.3 landed