Re: [HACKERS] pgkill on win32

2008-04-23 Thread Magnus Hagander
James Mansion wrote: > Magnus Hagander wrote: > > You interested in trying to code up a patch to verify that? ;) > > > > > Practical reality says that I won't get to this before the next > version of Windows is released. > I don't want to promise something I can't deliver. :-) If you want to th

Re: [HACKERS] pgkill on win32

2008-04-22 Thread James Mansion
Magnus Hagander wrote: You interested in trying to code up a patch to verify that? ;) Practical reality says that I won't get to this before the next version of Windows is released. I don't want to promise something I can't deliver. If there were any desire to provide a MT-aware postmaster,

Re: [HACKERS] pgkill on win32

2008-04-22 Thread Magnus Hagander
James Mansion wrote: > Magnus Hagander wrote: > > The problem is when winsock operations are interrupted by APCs. > > > > See: > > http://archives.postgresql.org/pgsql-hackers-win32/2004-04/msg00013.php > > > Whoa! Indeed, that's a bit sucky because they really aren't > documented as interrupti

Re: [HACKERS] pgkill on win32

2008-04-22 Thread Magnus Hagander
Martijn van Oosterhout wrote: > On Mon, Apr 21, 2008 at 09:47:02AM +0200, Magnus Hagander wrote: > > Uh, sorry, got that explained backwards. > > The problem is when winsock operations are interrupted by APCs. > > > > See: > > http://archives.postgresql.org/pgsql-hackers-win32/2004-04/msg00013.ph

Re: [HACKERS] pgkill on win32

2008-04-22 Thread Martijn van Oosterhout
On Mon, Apr 21, 2008 at 09:47:02AM +0200, Magnus Hagander wrote: > Uh, sorry, got that explained backwards. > The problem is when winsock operations are interrupted by APCs. > > See: > http://archives.postgresql.org/pgsql-hackers-win32/2004-04/msg00013.php WRT this bit: > (1) carries a big prob

Re: [HACKERS] pgkill on win32

2008-04-21 Thread James Mansion
Magnus Hagander wrote: The problem is when winsock operations are interrupted by APCs. See: http://archives.postgresql.org/pgsql-hackers-win32/2004-04/msg00013.php Whoa! Indeed, that's a bit sucky because they really aren't documented as interruptible. In this case though I see not materi

Re: [HACKERS] pgkill on win32

2008-04-21 Thread Magnus Hagander
James Mansion wrote: > 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. Uh, sorry,

Re: [HACKERS] pgkill on win32

2008-04-20 Thread James Mansion
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

Re: [HACKERS] pgkill on win32

2008-04-20 Thread Magnus Hagander
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

[HACKERS] pgkill on win32

2008-04-20 Thread James Mansion
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 Te