Re: Avoiding concurrent calls to bindtextdomain()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2024-02-08T18:08:21Z
Lists: pgsql-hackers
Attachments
- v2-0001-Clean-up-unnecessarily-Windows-dependent-code-in-.patch (text/x-diff) patch v2-0001
- v2-0002-Avoid-concurrent-calls-to-bindtextdomain.patch (text/x-diff) patch v2-0002
I wrote: > 0001 also gets rid of the possibility that pthread_mutex_init/ > pthread_mutex_lock could fail due to malloc failure. This seems > important since default_threadlock() assumes that pthread_mutex_lock > cannot fail in practice. I observe that ecpglib also assumes that, > although it's using CreateMutex() which has documented failure > conditions. So I wonder if we ought to copy this implementation > back into ecpglib; but I've not done that here. The cfbot seemed happy with v1, so here's a v2 that does copy that code back into ecpglib. (I kind of wonder why this code exists in libpq + ecpglib at all, rather than in src/port/; but that seems like a refactoring exercise for another day.) I double-checked that all the pthread_mutex_t variables in libpq and ecpglib are static, so the change in that struct should not pose an ABI hazard for back-patching. Barring objections, I plan to push this pretty soon. 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
-
Clean up Windows-specific mutex code in libpq and ecpglib.
- 9f041b041feb 15.7 landed
- 95e960e811b0 12.19 landed
- 9440d23a018c 16.3 landed
- 7d7cc7fd6fbd 14.12 landed
- 67f8cf0f0aca 13.15 landed
- 0028b55bc8e2 17.0 landed