Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Date
Msg-id 2239.1130001663@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
List pgsql-hackers
I wrote:
> Isn't there some way we can get the timer completion routine to be run
> by the signal thread instead?  This coding seems pretty unreliable to me
> even without QQ's patch.

After further thought it seems like the right thing to do is to redesign
port/win32/timer.c so that it sets up a separate thread whose
responsibility is to wait for timeouts and deliver a SIGALRM signal back
to the main thread when they happen.  It's probably a bit late to
consider doing this for 8.1 :-(

I've temporarily disabled Qingqing's patch by the expedient of removing
the UNBLOCKED_SIGNAL_QUEUE() check in the macro, so that the out-of-line
routine is always called (since we're going to do a kernel call anyway,
one extra layer of subroutine call doesn't seem very important).  We can
put it back after fixing timer.c.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Lifecycle management
Next
From: Tom Lane
Date:
Subject: Re: [Slony1-general] Slony1_funcs broken with 8.1