Re: Piggybacking vacuum I/O

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: Piggybacking vacuum I/O
Дата
Msg-id 20070123112105.55C1.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Piggybacking vacuum I/O  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki@enterprisedb.com> wrote:

> Vacuum is done in 3 phases:
> 1. Scan heap
> 2. Vacuum index
> 3. Vacuum heap

> A variation of the scheme would be to keep scanning pages that are in 
> cache, until the tid list reaches a predefined size, instead of keeping 
> track of which pages have already been seen. That would deal better with 
> tables with hot and cold spots, but it couldn't advance the relfrozenid 
> because there would be no guarantee that all pages are visited. Also, we 
> could start 1st phase of the next vacuum, while we're still in the 3rd 
> phase of previous one.

ISTM, it is another DSM that has a tuple-level accuracy, not a page-level.
One of the benefits is that we can skip the 1st phase of vacuum; We will
have a TID list of dead tuples at the start of vacuum, so we can start
from 2nd phase.

I have another idea for use of TID lists -- Store the TIDs after the 1st
or 2nd phase, and exit the vacuum. At the next vacuum, we will do both
the previous 3rd phase and new 1st phase at once, so that I/Os are reduced
(ndirtyblocks + nindexblocks) from (2*ndirtyblocks + nindexblocks) in
average. We've already use a similar method in vacuuming btree indexes
to collect recyclable empty pages.

I think piggybacking of I/Os are very useful. Buffer manager helps us
folding up some of I/Os, but explicit orders are more effective.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Default permissisons from schemas
Следующее
От: "FAST PostgreSQL"
Дата:
Сообщение: Updateable cursors