Re: Dead Space Map

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Dead Space Map
Дата
Msg-id 87acccypjt.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Dead Space Map  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Dead Space Map  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Heikki Linnakangas <hlinnaka@iki.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Dead Space Map
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Vacuum dead tuples that are "between" transactions