]> granicus.if.org Git - postgresql/commit
Reduce idle power consumption of stats collector process.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 9 May 2012 01:26:46 +0000 (21:26 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 9 May 2012 01:26:46 +0000 (21:26 -0400)
commit49340037ee3ab46cb24144a86705e35f272c24d5
tree885fd2e5ed2c33d889d7bfe2776a8d1a3f11baa2
parent5461564a9dfd73f12a21f2aff5d7b3678c7afc25
Reduce idle power consumption of stats collector process.

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().
src/backend/postmaster/pgstat.c