Checkpoints and buffers that are hint-bit-dirty

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Checkpoints and buffers that are hint-bit-dirty
Date: 2007-07-07 03:29:42
Message-ID: 87vecwsxg9.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


When we checkpoint we write out all dirty buffers. But ISTM we don't really
need to write out buffers which are dirty but which have an LSN older than the
previous checkpoint. Those represent buffers which were dirtied by a
non-wal-logged modification, ie, hint bit setting. The other non-wal-logged
operations will sync the buffer themselves when they're done.

I guess it doesn't really buy much, probably just a slight delay in writing
out the page until bgwriter gets around to it. Conceivably you could have a
hot buffer with many missing hint bits which will get written out on several
checkpoints but how many of those can you have? And extending the checkpoint
doesn't seem like much of a concern. On the other hand it wouldn't be hard to
check would it?

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2007-07-07 08:02:07 Re: Bgwriter strategies
Previous Message Tom Lane 2007-07-07 03:13:31 Re: usleep feature for pgbench