model-writtenrun 3057 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro proposed removing unsupported non-thread-safe build paths and obsolete locking, then replacing scattered POSIX/Windows wrappers with a small C11-inspired pg_threads.h API in #1; direct C11 adoption was premature, and Windows thread-local destructors remained unresolved.
- Andres Freund supported the cleanup, preferred a thread_local storage class where possible, suggested preserving the compatibility macro, and proposed consolidating threading headers in #2; Joe Conway highlighted that library constructors do not initialize each new thread's local state in #3.
- Peter Eisentraut found that the removal accidentally dropped a reachable LDAP linking branch and requested retaining ENABLE_THREAD_SAFETY for ECPG clients in #4; Heikki Linnakangas endorsed the first three patches and supplied documentation explaining mandatory thread safety and connection-sharing restrictions in #5.
- Thomas landed the unchanged fe-auth.c cleanup as 1aadc504bf and the port/thread.c rename with additional stale-reference cleanup as 89333db963, both from #1, and announced them in #6.
- The remaining cleanup submission in #6 corrected LDAP linking, retained compatibility macros in c.h and ecpg_config.h, and incorporated Heikki's documentation with an XML fix, while postponing the common threading API.
- Thomas then omitted the c.h compatibility macro but retained the ECPG definition, landing the cleanup as 68a4b58eca and the unchanged documentation member as ce0b0fa3e7; he explained this decision in #7, and Andres accepted it in #8.
- A Windows buildfarm ECPG failure initially raised concern in #9, but Thomas recognized prior occurrences in #10 and attributed it to an existing TCP linger/process-exit problem in #11, without a corrective patch or revert in this thread.
- Thomas revived the API work for PostgreSQL 18 in #12, planning a portable thread_local storage class while noting that C thread-local variables cannot replace the destructors ECPG needs.
- The revised API in #13 combined the remaining original patches, added pg_thread_local and custom Windows destructor tracking, and reportedly passed tests, but still required a solution for frontend memory barriers on non-TSO hardware.
- At the thread's end, Heikki's review in #14 questioned mixing fiber-local destructors with thread-local values, suggested deferring Windows destructor support and simplifying the locking API, and identified naming, race and barrier concerns; the cleanup and documentation had landed, while the threading API remained unfinished.