Re: [PROPOSAL] VACUUM Progress Checker.

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PROPOSAL] VACUUM Progress Checker.
Дата
Msg-id 20150731182109.GY2441@postgresql.org
обсуждение исходный текст
Ответ на Re: [PROPOSAL] VACUUM Progress Checker.  (Rahila Syed <rahilasyed90@gmail.com>)
Ответы Re: [PROPOSAL] VACUUM Progress Checker.  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: [PROPOSAL] VACUUM Progress Checker.  (Robert Haas <robertmhaas@gmail.com>)
Re: [PROPOSAL] VACUUM Progress Checker.  (Rahila Syed <rahilasyed90@gmail.com>)
Список pgsql-hackers
I think the only way to produce usable estimates is to report more than
one number.  And in the particular case of lazy vacuuming, ISTM the way
to do it is to consider heap scanning as one phase, index cleanup as
another phase; these two phases can be interleaved.  And there's a final
heap scan which is a third phase, which can only run after phases one
and two are complete.

So you would report either "we're in phases one/two" or "we're in phase
three".  If we're in phases one/two, then we need to report

1. what's the page number of heap scan (i.e. how much more do we have to  go yet?)
2. how many index scans have we done so far
3. if phase two, how many index pages have we scanned (total, i.e.  across all indexes).

The total number of heap pages is known, and the total number of index
pages is also known, so it's possible to derive a percentage out of
this part.  Maybe it would be useful to report how much time it's been
in phases one and two respectively; with that, I think it is possible to
extrapolate the total time.

If we're in third phase, we report the heap page number we're in.

This looks pretty complicated to understand from the user POV, but
anything other than this seems to me too simplistic to be of any use.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Jesper Pedersen
Дата:
Сообщение: Re: RequestAddinLWLocks(int n)
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [PROPOSAL] VACUUM Progress Checker.