On Tue, Dec 13, 2016 at 9:49 PM, Andres Freund <and...@anarazel.de> wrote:
> On 2016-12-12 16:46:38 +0900, Michael Paquier wrote:
>> OK, I think that I have spotted an issue after additional read of the
>> code. When a WSA event is used for read/write activity on a socket,
>> the same WSA event gets reused again and again. That's fine for
>> performance reasons
> It's actually also required to not loose events,
> i.e. correctness. Windows events are edge, not level triggered.
Are all Windows events edge triggered? What I read from msdn , it
doesn't appear so. I am quoting text from msdn page  which seems
to be saying the event FD_READ we use in this case is level triggered.
"For FD_READ, FD_OOB, and FD_ACCEPT network events, network event
recording and event object signaling are level-triggered."
> previous implementation wasn't correct. So just resetting things ain't
Okay, but I think we need to re-enable the existing event handle for
required event (FD_READ) by using WSAEventSelect() to make it work
sanely. We have tried something on those lines and it resolved the
problem. Ashutosh will post a patch on those lines later today. Let
us know if you have something else in mind.
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: