Re: Separating bgwriter and checkpointer - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Separating bgwriter and checkpointer
Date
Msg-id CA+TgmoZNtGiPEascxr4sq19V1U-9TpwLrXO8gimL7fUfb6=_0A@mail.gmail.com
Whole thread Raw
In response to Re: Separating bgwriter and checkpointer  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Tue, Sep 20, 2011 at 9:35 AM, Heikki Linnakangas
<heikki.linnakangas@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


pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Back-branch releases upcoming this week
Next
From: Tom Lane
Date:
Subject: Re: Back-branch releases upcoming this week