Re: should we set hint bits without dirtying the page? - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: should we set hint bits without dirtying the page?
Date
Msg-id 1291400824.18031.1721.camel@jdavis
Whole thread Raw
In response to should we set hint bits without dirtying the page?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, 2010-12-02 at 19:00 -0500, Robert Haas wrote:
>  Untidy buffers would be treated as dirty by the background writer
> cleaning scan, but as clean by checkpoints and by backends doing
> emergency buffer cleaning to feed new allocations. 

Differentiating between a backend write and a bgwriter write sounds like
a good heuristic to me. Of course, only numbers can tell, but it sounds
promising.

> I then got to wondering whether we should even go a step further, and
> simply decree that a page with only hint bit updates is not dirty and
> won't be written, period.

Sounds reasonable.

Just to throw another idea out there, perhaps we could change the
behavior based on whether the page is already dirty or not. I haven't
thought this through, but it might be an interesting approach.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Extensions
Next
From: Peter Eisentraut
Date:
Subject: Re: Patch to add a primary key using an existing index