Re: On the usefulness of hint bits - Mailing list pgsql-hackers

From Robert Haas
Subject Re: On the usefulness of hint bits
Date
Msg-id AANLkTik5adeLM+puT8BsSMPJK_knS0jEb193g2xmhyE7@mail.gmail.com
Whole thread Raw
In response to Re: On the usefulness of hint bits  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: On the usefulness of hint bits
Re: On the usefulness of hint bits
List pgsql-hackers
On Mon, Oct 11, 2010 at 10:14 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Reduction of contention for pg_clog access, for one thing.  If you read
> the archives, you'll find that pg_clog access contention has been shown
> to be one cause of "context swap storms".

I wonder if we could improve this with some sort of process-local
cache - not to get rid of hint bits, just to reduce pg_clog
contention.  We might easily end up testing the same XID many times
during the same table scan.

Another idea that's been discussed before is to avoid writing out
pages when only the hit bints have changed.  Or perhaps to write them
out from the background writer only, but not from backends and not
when checkpointing - have a state BM_UNTIDY, which the background
writer cleaning scan will treat as dirty, but which can otherwise be
treated as "not dirty", so that if we start to run short of free
buffers we don't hold things up writing out the hint bit updates.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Leonardo Francalanci
Date:
Subject: Re: On the usefulness of hint bits
Next
From: Leonardo Francalanci
Date:
Subject: Re: On the usefulness of hint bits