Re: Cleaning up threading code

2024-08-26 Thread Heikki Linnakangas
On 21/08/2024 15:51, Thomas Munro wrote: On Sun, Apr 14, 2024 at 3:16 PM Thomas Munro wrote: So I'll go ahead and add the storage class to the next version, and contemplate a couple of different options for the tss stuff, including perhaps leaving it out if that seems doable. Here is a new at

Re: Cleaning up threading code

2024-08-21 Thread Thomas Munro
On Sun, Apr 14, 2024 at 3:16 PM Thomas Munro wrote: > So I'll go ahead and add the storage class to the next version, and > contemplate a couple of different options for the tss stuff, including > perhaps leaving it out if that seems doable. Here is a new attempt at pg_threads.h. Still work in p

Re: Cleaning up threading code

2024-04-13 Thread Thomas Munro
On Mon, Jul 3, 2023 at 8:43 PM Heikki Linnakangas wrote: > On 10/06/2023 05:23, Thomas Munro wrote: > > 2. I don't like the way we have to deal with POSIX vs Windows at > > every site where we use threads, and each place has a different style > > of wrappers. I considered a few different approac

Re: Cleaning up threading code

2023-07-11 Thread Thomas Munro
On Wed, Jul 12, 2023 at 3:34 PM Thomas Munro wrote: > On Wed, Jul 12, 2023 at 3:21 PM Thomas Munro wrote: > > Apparently "drongo" didn't like something about this commit, and an > > ecpg test failed, but I can't immediately see why. Just "server > > closed the connection unexpectedly". drongo i

Re: Cleaning up threading code

2023-07-11 Thread Thomas Munro
On Wed, Jul 12, 2023 at 3:21 PM Thomas Munro wrote: > Apparently "drongo" didn't like something about this commit, and an > ecpg test failed, but I can't immediately see why. Just "server > closed the connection unexpectedly". drongo is running the new Meson > buildfarm variant on Windows+MSVC,

Re: Cleaning up threading code

2023-07-11 Thread Thomas Munro
Apparently "drongo" didn't like something about this commit, and an ecpg test failed, but I can't immediately see why. Just "server closed the connection unexpectedly". drongo is running the new Meson buildfarm variant on Windows+MSVC, so, being still in development, I wonder if some diagnostic c

Re: Cleaning up threading code

2023-07-11 Thread Andres Freund
On 2023-07-12 08:58:29 +1200, Thomas Munro wrote: > On Mon, Jul 10, 2023 at 10:45 AM Thomas Munro wrote: > > * defined ENABLE_THREAD_SAFETY 1 in c.h, for the benefit of extensions > > I may lack imagination but I couldn't think of any use for that > vestigial macro in backend/extension code, and

Re: Cleaning up threading code

2023-07-11 Thread Thomas Munro
On Mon, Jul 10, 2023 at 10:45 AM Thomas Munro wrote: > * defined ENABLE_THREAD_SAFETY 1 in c.h, for the benefit of extensions I may lack imagination but I couldn't think of any use for that vestigial macro in backend/extension code, and client code doesn't see c.h and might not get the right answ

Re: Cleaning up threading code

2023-07-09 Thread Thomas Munro
Thanks all for the reviews. I pushed the first two small patches. Here is a new version of the main --disable-thread-safety removal part, with these changes: * fixed LDAP_LIBS_FE snafu reported by Peter E * defined ENABLE_THREAD_SAFETY 1 in c.h, for the benefit of extensions * defined ENABLE_THRE

Re: Cleaning up threading code

2023-07-03 Thread Heikki Linnakangas
On 03/07/2023 10:29, Peter Eisentraut wrote: On 10.06.23 07:26, Andres Freund wrote: -### -# Threading -### - -# XXX: About to rely on thread safety in the autoconf build, so n

Re: Cleaning up threading code

2023-07-03 Thread Peter Eisentraut
On 10.06.23 07:26, Andres Freund wrote: -### -# Threading -### - -# XXX: About to rely on thread safety in the autoconf build, so not worth -# implementing a fallback. -cdata.se

Re: Cleaning up threading code

2023-06-10 Thread Joe Conway
On 6/10/23 01:26, Andres Freund wrote: On 2023-06-10 14:23:52 +1200, Thomas Munro wrote: I'm not talking about other stuff like C11 atomics, memory models, and the thread_local storage class, which are all very good and interesting topics for another day. Hm. I agree on C11 atomics and memory

Re: Cleaning up threading code

2023-06-09 Thread Andres Freund
Hi, On 2023-06-10 14:23:52 +1200, Thomas Munro wrote: > 1. We should completely remove --disable-thread-safety and the > various !defined(ENABLE_THREAD_SAFETY) code paths. Yes, please! > 2. I don't like the way we have to deal with POSIX vs Windows at > every site where we use threads, and ea