Re: pgkill on win32 - Mailing list pgsql-hackers

From James Mansion
Subject Re: pgkill on win32
Date
Msg-id 480C1FE9.9070605@mansionfamily.plus.com
Whole thread Raw
In response to Re: pgkill on win32  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pgkill on win32  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander wrote:
> Yes. We used to use APCs, but touching anything remotely related to
> Winsock from an APC is not supported... We had a lot of trouble with it
>   
By implication you'd be doing socket'y stuff from the signal handler on 
UNIX? Scary.
I was assuming it would be used to signal an event that would release 
the main
thread and then do the real work there.

I suppose by implication you can't knock a thread out of select from the 
APC?

Though, presumably, you could hand over the request to a waiting 
application thread
and *that* would have full WinSock access.

I can help feeling that the eventselect mechanism is the one to use, not 
the crappy
bsd select emulation.

> initially, and it took a long support case with Microsoft PSS to figure
> out what was broken, because this being unsupported was not properly
> documented.
>   
Indeed. And its a very odd limitation given the way that APCs are used 
with completion ports.
Did any sort of reference get written to the knowledge base for this, do 
you know?

> It certainly is ;-) We could probably find something more efficient,
> but APCs are not the one.
>   
The concern I have isn't so much that the mechanism might be a bit ugly, 
but the synchronous
delivery and the scheduling gymnastics implied..




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: INSERT ... SELECT ... FOR SHARED?
Next
From: Magnus Hagander
Date:
Subject: Re: pgkill on win32