Re: Proposal: Another attempt at vacuum improvements

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Proposal: Another attempt at vacuum improvements
Дата
Msg-id BANLkTi=jM_OaXF4HXco++Y05ucXNeQ-=cQ@mail.gmail.com
обсуждение исходный текст
Ответ на Proposal: Another attempt at vacuum improvements  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Proposal: Another attempt at vacuum improvements
Список pgsql-hackers
On Tue, May 24, 2011 at 7:58 AM, Pavan Deolasee
<pavan.deolasee@gmail.com> wrote:

> The biggest gripe today is that vacuum needs two heap scans and each scan
> dirties the buffer.

That's not that clear to me. The debate usually stalls because we
don't have sufficient info from real world analysis of where the time
goes.

> So the idea is to separate the index vacuum (removing index pointers to dead
> tuples) from the heap vacuum. When we do heap vacuum (either by HOT-pruning
> or using regular vacuum), we can spool the dead line pointers somewhere.

ISTM it will be complex to attempt to store the exact list of TIDs
between VACUUMs.

At the moment we scan indexes if we have > 0 rows to remove, which is
probably wasteful. Perhaps it would be better to keep a running total
of rows to remove, by updating pg_stats, then when we hit a certain
threshold in total we can do the index scan. So we don't need to
remember the TIDs, just remember how many there were and use that to
avoid cleaning too vigorously.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Domains versus polymorphic functions, redux
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: The way to know whether the standby has caught up with the master