model-writtenrun 8938 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the thread after Windows buildfarm members repeatedly missed a notification in the new async-notify isolation test, suspecting Windows signal emulation; Andrew Dunstan noted that affected machines were virtualized #1 #2.
- Mark Dilger suggested a client-side input-consumption race, but Tom explained that notification messages should precede ReadyForQuery and proposed an extra CHECK_FOR_INTERRUPTS(); Andrew tested that change and found it did not fix the failure #3 #4 #7.
- Amit Kapila proposed adding a sleep before the listener's commit, and Andrew confirmed that this made the notification appear, strengthening the suspicion of delayed signal delivery #8 #9 #10.
- Tom questioned the cost and failure modes of creating a new pipe and dispatch thread for every signal, opening a separate simplification effort #13.
- Amit identified that the dispatch thread acknowledged the sender before queuing the signal and proposed moving pg_queue_signal() before WriteFile(); Tom agreed that acknowledgment should guarantee the recipient's signal flag was set #14 #16 #17.
- Tom posted Amit's race fix with explanatory comments, then supplied a separate patch on top that handled requests directly in the persistent signal thread and reused its pipe #18 #19.
- Andrew tested both patches successfully on REL_10_STABLE, and Tom chose to backpatch the race fix while reserving the structural simplification for the development branch #20 #21.
- The race fix landed as 28e6a2fd63 from #18, with one additional comment correction and backports to all supported branches.
- Amit questioned whether serializing signal requests could sacrifice concurrency, but accepted Tom's argument that avoiding thread and pipe creation removed failure modes and favored the usual single-signal case #22 #23 #24.
- Tom committed the single-thread patch from #19 as 16114f2ea0, with only comment changes, and announced completion in #25.
- Months later, Thomas Munro reported similar async-notify failures on older branches; Tom distinguished delayed receipt from the original missing notification, doubted that backpatching the single-thread change would help, and left the timing problem and its apparent restriction to older branches unresolved #26 #27.