Tom Lane <[EMAIL PROTECTED]> writes:

> Heikki Linnakangas <[EMAIL PROTECTED]> writes:

> > * implementation of index-only scans
> 
> > An index scan would not have to check the visibility information of heap 
> > tuples on those heap pages that are marked as clean in the dead space map.
> > This requires that the dead space map is implemented so that a page is 
> > reliably marked as dirty in all circumstances when it contains any tuples 
> > that are not visible to all backends.
> 
> The "reliably" part of this is likely to make it a non-starter.  Another
> problem is that the semantics needed by this are not quite the same as
> the semantics of whether a page needs to be visited by vacuum.

It would be very disappointing if this part doesn't turn out to be possible.

I had always thought the semantics were the same, but now I'm realizing that
vacuum doesn't need to visit tuples that have been committed even if they're
not visible to some transaction. So having a "vacuum can ignore this" bit
doesn't help you with index scans.

But I think the thought process went the other direction. If you have the bit
intended for index scans indicating that the tuple is not "in doubt" ie, it's
visible to every transaction, then that also implies the tuple doesn't need to
be visited by vacuum.

Skipping pages that don't contain any in doubt tuples would be a huge win.
Even if there might be some additional pages that vacuum could in theory be
skipping too.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to