Re: Turning off HOT/Cleanup sometimes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Turning off HOT/Cleanup sometimes
Дата
Msg-id 20150420191922.GW4369@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Turning off HOT/Cleanup sometimes  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Turning off HOT/Cleanup sometimes  (Bruce Momjian <bruce@momjian.us>)
Re: Turning off HOT/Cleanup sometimes  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian wrote:

> I think the limit has to be in terms of a percentage of the table size. 
> For example, if we do one SELECT on a table with all non-dirty pages, it
> would be good to know that 5% of the pages were pruned --- that tells me
> that another 19 SELECTs will totally prune the table, assuming no future
> writes.

This seems simple to implement: keep two counters, where the second one
is pages we skipped cleanup in.  Once that counter hits SOME_MAX_VALUE,
reset the first counter so that further 5 pages will get HOT pruned.  5%
seems a bit high though.  (In Simon's design, SOME_MAX_VALUE is
essentially +infinity.)

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



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Freeze avoidance of very large table.
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Turning off HOT/Cleanup sometimes