From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Avoiding concurrent calls to bindtextdomain() |
Date: | 2024-02-08 18:08:21 |
Message-ID: | 1058465.1707415701@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Clean-up-unnecessarily-Windows-dependent-code-in-.patch | text/x-diff | 8.6 KB |
v2-0002-Avoid-concurrent-calls-to-bindtextdomain.patch | text/x-diff | 5.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bernd Helmle | 2024-02-08 18:14:05 | Re: [PATCH] Add sortsupport for range types and btree_gist |
Previous Message | Alexander Lakhin | 2024-02-08 18:00:01 | Re: Race condition in FetchTableStates() breaks synchronization of subscription tables |