Skip site navigation (1) Skip section navigation (2)

Re: Dead Space Map

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Dead Space Map
Date: 2006-02-28 06:18:14
Message-ID: 87acccypjt.fsf@stark.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Heikki Linnakangas <hlinnaka(at)iki(dot)fi> 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


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-02-28 06:32:19
Subject: Re: Vacuum dead tuples that are "between" transactions
Previous:From: Tom LaneDate: 2006-02-28 06:04:00
Subject: Re: Dead Space Map

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group