pgkill on win32

From: James Mansion <james(at)mansionfamily(dot)plus(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pgkill on win32
Date: 2008-04-20 13:26:14
Message-ID: 480B4476.3030308@mansionfamily.plus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Smet 2008-04-20 14:23:47 -DCLOBBER_CACHE_ALWAYS build takes far longer than before
Previous Message mito 2008-04-20 11:44:37 WAL files format