model-writtenrun 7718 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro opened the thread with #1, proposing WaitMyLatch() and reusable wait sets for condition variables and the statistics collector to avoid repeated epoll/kqueue setup and teardown.
- In #2, Thomas extended the series to WAL receivers using a libpq socket-change counter, while #3 clarified that cleanup and the interface structure were still exploratory.
- Thomas substantially redesigned the series in #4: ordinary WaitLatch() would reuse a startup-created set, libpqwalreceiver would own replication wait management, and RemoveWaitEvent() would support changing sockets in replication and postgres_fdw.
- The expanded series in #4 also introduced level-triggered kqueue behavior, proposed standardizing FeBeWaitSet postmaster-death handling, and reused FeBeWaitSet in WAL senders; Thomas reported testing across several wait implementations.
- Kyotaro Horiguchi's review in #5 found a duplicate close, missing handling for waits without WL_LATCH_SET, and Windows array concerns, and recommended naming the common set LatchWaitSet.
- In #6, Kyotaro supplied an alternative using libpq disconnection callbacks instead of a socket-change counter, proposed richer PQregisterEventProc() results, and reported regression testing while retaining Thomas's other patches.
- The unchanged kqueue prerequisite carried in #6 landed as 9b8aa09293, removing EV_CLEAR so readiness persists across repeated waits.
- Continuing his review in #7, Kyotaro questioned suppressing the postmaster-death message, requested clearer WAL-sender event positions, reviewed the statistics-collector conversion, and suggested sharing one wait set across FDW connections.
- After Daniel Gustafsson requested removal of the committed prerequisite in #8, Tom Lane rejected the proposed libpq API/ABI changes in #9 and questioned exposing internal connection drops as application events.
- Thomas narrowed #10 to fixed-descriptor changes, incorporated the latch fixes and symbolic event positions, and deferred dynamic-socket work while favoring further investigation of libpq callbacks.
- The first three patches from #10 landed as 3347c982ba with light comment and formatting edits, e2d394df5d unchanged, and e7591fd3ca with whitespace only; Thomas reported substantial syscall reductions in #11.
- Thomas resent the three remaining FeBeWaitSet patches in #12 and rebased them again after several months in #13, leaving the proposed change to postmaster-death messages unresolved.
- In #14, Thomas preserved existing error-message behavior and added WalSndWait() for explicit postmaster-death handling; its two patches landed unchanged as a042ba2ba7 and 6230912f23.
- Thomas confirmed the final landing in #15, leaving WAL-receiver and postgres_fdw improvements unfinished and the CommitFest entry temporarily open for a revised callback-based approach addressing Tom's objections.