Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>,
Andrew Dunstan <andrew.dunstan@2ndquadrant.com>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
pgsql-hackers@postgreSQL.org
Date: 2017-03-17T04:29:43Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > On 2017-03-16 13:00:54 +0100, Petr Jelinek wrote: >> Looks like that didn't help either. >> >> I setup my own Windows machine and can reproduce the issue. I played >> around a bit and could not really find a fix other than adding >> WL_TIMEOUT and short timeout to WaitLatchOrSocket (it does wait a very >> long time on the WaitLatchOrSocket otherwise before failing). > Hm. Could you use process explorer or such to see the exact events > happening? Seing that might help us to nail this down. At this point it's hard to escape the conclusion that we're looking at some sort of bug in the Windows version of the WaitEventSet infrastructure --- or at least, the WaitEventSet-based waits for socket events are evidently behaving differently from the implementation on the libpq side, which is based on pqWaitTimed and thence pqSocketCheck and thence pqSocketPoll. Noticing that bowerbird builds with openssl, I'm a bit suspicious that the issue might have something to do with the fact that pqSocketCheck has a special case for SSL, which I don't think WaitEventSet knows about. But I don't think SSL is actually active in the buildfarm run, so it's hard to see how we get to that scenario exactly --- or even less why it would only matter on Windows. regards, tom lane
Commits
-
Fix WaitEventSetWait() to handle write-ready waits properly on Windows.
- f7819baa618c 10.0 landed
- 8e6333e1cb77 9.6.3 landed
-
Rewrite async-connection loop in libpqwalreceiver.c, once again.
- b5dd50f2c0ad 10.0 landed
-
Use asynchronous connect API in libpqwalreceiver
- 1e8a85009447 10.0 cited