Re: pgkill on win32

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: James Mansion <james(at)mansionfamily(dot)plus(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgkill on win32
Date: 2008-04-20 17:08:38
Message-ID: 20080420190838.333ebef9@mha-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-04-20 17:13:54 Re: TODO, FAQs to Wiki?
Previous Message Mark Mielke 2008-04-20 16:59:35 INSERT ... SELECT ... FOR SHARED?