From: Gregory Stark <stark@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Hint Bits and Write I/O
Date: Wed, 28 May 2008 06:08:12 -0400
Message-ID: <87hccispv7.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <15901.1211931165@sss.pgh.pa.us>
References: <1211916951.4489.232.camel@ebony.site>
<15901.1211931165@sss.pgh.pa.us>
"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> (Although that argument might not hold water for a bulk seqscan: you'll
> have hinted all the tuples and then very possibly throw the page away
> immediately.
That seems like precisely the case where we don't want to dirty the buffer.
> So counting the hints and eventually deciding we did
> enough to justify dirtying the page might be worth doing.)
What if we counted how many hint bits were *not* set? I feel like the goal
should be to dirty the buffer precisely once when all the bits can be set. The
problem case is when we dirty the page but still have some hint bits to be set
on a subsequent iteration.
Of course that doesn't deal with the case where tuples are being touched
continuously. Perhaps the idea should be to treat the page as dirty every n
hint bit settings where n is the number of tuples on the page. or highest
number of unset hint bits seen on the page. or something like that.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-patches@postgresql.org
Cc: stark@enterprisedb.com, tgl@sss.pgh.pa.us, simon@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: Hint Bits and Write I/O
In-Reply-To: <87hccispv7.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox