Re: pgkill on win32 - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pgkill on win32
Date
Msg-id 20080420190838.333ebef9@mha-laptop
Whole thread Raw
In response to pgkill on win32  (James Mansion <james@mansionfamily.plus.com>)
Responses Re: pgkill on win32  (James Mansion <james@mansionfamily.plus.com>)
List pgsql-hackers
James Mansion wrote:
> I'm wondering if the mechanism used for sending signals between 
> postmaster processes on Win32 is much more heavyweight that is
> necessary.
> 
> Is there a reason not to call OpenThread on the target postmaster's 
> thread id, and then use QueueUserAPC to execute a 'signal handler' 
> method on it?  (Or Terminate Thread for 'extreme' cases).

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
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.


> Haven't tried it - but I can't help thinking that the named pipe
> service is a bit heavyweight.

It certainly is ;-) We could probably find something more efficient,
but APCs are not the one.

//Magnus


pgsql-hackers by date:

Previous
From: Mark Mielke
Date:
Subject: INSERT ... SELECT ... FOR SHARED?
Next
From: Magnus Hagander
Date:
Subject: Re: TODO, FAQs to Wiki?