Re: Hint Bits and Write I/O - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Hint Bits and Write I/O
Date
Msg-id 1211926936.2705.12.camel@dogma.ljc.laika.com
Whole thread Raw
In response to Hint Bits and Write I/O  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
On Tue, 2008-05-27 at 20:35 +0100, Simon Riggs wrote:
> My proposal is to have this as a two-stage process. When we set the hint
> on a tuple in a clean buffer we mark it BM_DIRTY_HINTONLY, if not
> already dirty. If we set a hint on a buffer that is BM_DIRTY_HINTONLY
> then we mark it BM_DIRTY.

I would suggest calling that something like BM_DIRTY_ONEHINT or
something, to more accurately reflect what's happening.

Even when we do mark it several times, why do we need to actually mark
it BM_DIRTY? We can then mark it BM_DIRTY_HINTSONLY, and then use some
heuristics to determine whether we actually want to write it. For
instance, we don't need to write out such a page during checkpoint,
right? That might help smooth things out. Or during heavy I/O activity
in general, for that matter.

If it's only a hint, then that means we have the option. We might as
well express the fact that it is optional to something better able to
make the decision, like the process evicting the buffer or the bgwriter.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Hint Bits and Write I/O
Next
From: Tom Lane
Date:
Subject: Re: Hint Bits and Write I/O