Re: Windows buildfarm members vs. new async-notify isolation test
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Magnus Hagander <magnus@hagander.net>,
Mark Dilger <hornschnorter@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-12-08T16:22:08Z
Lists: pgsql-hackers
Attachments
- this-might-fix-windows-race-condition.patch (text/x-diff) patch
I wrote: > Amit Kapila <amit.kapila16@gmail.com> writes: >> IIUC, once the dispatch thread has queued the signal >> (pg_queue_signal), the next CHECK_FOR_INTERRUPTS by the main thread >> will execute the signal. So, if we move pg_queue_signal() before we >> do WriteFile in pg_signal_dispatch_thread(), this race condition will >> be closed. Now, we might not want to do this as that will add some >> more time (even though very less) before notify on the other side can >> finish or maybe there is some technical problem with this idea which I >> am not able to see immediately. > Hmm. Certainly worth trying to see if it resolves the failure on > Andrew's machines. For Andrew's convenience, here's a draft patch for that. I took the liberty of improving the rather thin comments in this area, too. regards, tom lane
Commits
-
Use only one thread to handle incoming signals on Windows.
- 16114f2ea0c0 13.0 landed
-
Fix race condition in our Windows signal emulation.
- df44e411c008 9.6.17 landed
- 7309e75fa956 9.4.26 landed
- 1a0c65120137 9.5.21 landed
- 096ea540e1e9 10.12 landed
- 2ed302ab9703 11.7 landed
- 28e6a2fd6358 13.0 landed
- 001362cfdc94 12.2 landed