• Tom Lane's avatar
    Reduce idle power consumption of stats collector process. · 49340037
    Tom Lane authored
    Latch-ify the stats collector, so that it does not need an arbitrary wakeup
    cycle to check for postmaster death.  The incremental savings in idle power
    is pretty marginal, since we only had it waking every two seconds; but I
    believe that this patch may also improve the collector's performance under
    load, by reducing the number of kernel calls made per message when messages
    are arriving constantly (we now avoid a select/poll call except when we
    need to sleep).  The change also reduces the time needed for a normal
    database shutdown on platforms where signals don't interrupt select().
    49340037
pgstat.c 119 KB