Re: Possible explanation for Win32 stats regression test

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: korryd(at)enterprisedb(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible explanation for Win32 stats regression test
Date: 2006-07-17 21:27:36
Message-ID: 8612.1153171656@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

korry <korry(at)appx(dot)com> writes:
> The problem is that, each time you go through
> pgwin32_waitforsinglesocket(), you tie the *same* kernel object
> (waitevent is static) to each socket.

> The fix is pretty simple - just call WSAEventSelect( s, waitevent, 0 )
> after WaitForMultipleObjectsEx() returns. That disassociates the socket
> from the Event (it will get re-associated the next time
> pgwin32_waitforsingleselect() is called.

Hmm. Presumably we don't do this a whole lot (use multiple sockets) or
we'd have noticed before. Perhaps better would be to keep an additional
static variable saying which socket the event is currently associated
to, and only issue the extra WSAEventSelect calls if we need to change
it. Or is WSAEventSelect fast enough that it doesn't matter?

Anyway, someone with a Windows machine needs to code and test this ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2006-07-17 21:42:10 Re: 8.2 features?
Previous Message Martin Pitt 2006-07-17 21:27:24 pg_dump: add option to ignore TABLE DATA for failed TABLE object creation

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2006-07-17 21:42:10 Re: 8.2 features?
Previous Message Bruce Momjian 2006-07-17 19:43:14 Re: src/tools/pginclude considered harmful (was Re: