pgkill on win32 - Mailing list pgsql-hackers

From James Mansion
Subject pgkill on win32
Date
Msg-id 480B4476.3030308@mansionfamily.plus.com
Whole thread Raw
Responses Re: pgkill on win32  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
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).

I don't think its entirely trivial because it would be better to cache 
the handles for a short time rather than Open/Queue/Close each time, so 
it may still be necessary to have a background thread that checks the 
handles are not signalled and closes them if they are. But signal 
delivery could be somewhat faster.

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

James




pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: get rid of psql welcome message
Next
From: mito
Date:
Subject: WAL files format