On Tue, Sep 20, 2011 at 9:35 AM, Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> wrote: >> All that said my question is which way is the code more legible and >> easier to follow? > > Hear hear. If we're going to give the bgwriter more responsibilities, this > might make sense even if it has no effect on performance.
I agree. I don't think this change needs to be justified on performance grounds; there are enough collateral benefits to make it worthwhile. If the checkpoint process handles all the stuff with highly variable latency (i.e. fsyncs), then the background writer work will happen more regularly and predictably. The code will also be simpler, which I think will open up opportunities for additional optimizations such as (perhaps) making the background writer only wake up when there are dirty buffers to write, which ties in to longstanding concerns about power consumption. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers