Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal
Date
Msg-id AANLkTinPZTY3dwaCcabRNKfM2xwo_a2O=aDaqiMCdZuV@mail.gmail.com
Whole thread Raw
In response to Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal
Re: Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal
List pgsql-hackers
On Sun, Nov 14, 2010 at 8:52 PM, Josh Berkus <josh@agliodbs.com> wrote:
> For example, imagine if the hint bits were moved to a separate per-table
> bitmap outside the table instead of being stored with each row, as the
> current FSM is.

How many times do we have to keep going around the same block?

We *already* have separate bitmap outside the table for transaction
commit bits. It's the clog.

The only reason the hint bits exist is to cache that so we don't need
to do extra I/O to check tuple visibility. If the hint bits are moved
outside the table then they serve no purpose whatsover. Then you have
an additional I/O to attempt to save an additional I/O.

The only difference between the clog and your proposal is that the
clog is two bits per transaction and your proposal is 4 bits per
tuple. The per-tuple idea guarantees that the extra I/O will be very
localized which isn't necessarily true for the clog but the clog is
small enough that it probably is true anyways. And even if there's no
I/O the overhead to consult the clog/per-table fork in memory is
probably significant.


-- 
greg


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: wCTE behaviour
Next
From: Tom Lane
Date:
Subject: Re: wCTE behaviour