Re: Turning off HOT/Cleanup sometimes
От | Bruce Momjian |
---|---|
Тема | Re: Turning off HOT/Cleanup sometimes |
Дата | |
Msg-id | 20150420214433.GA8729@momjian.us обсуждение исходный текст |
Ответ на | Re: Turning off HOT/Cleanup sometimes (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: Turning off HOT/Cleanup sometimes
|
Список | pgsql-hackers |
On Mon, Apr 20, 2015 at 04:19:22PM -0300, Alvaro Herrera wrote: > 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.) This would tend to dirty non-sequential heap pages --- it seems best to just clean as many as we are supposed to, then skip the rest, so we can write sequential dirty pages to storage. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
В списке pgsql-hackers по дате отправления: