Re: Turning off HOT/Cleanup sometimes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Turning off HOT/Cleanup sometimes
Дата
Msg-id 20150415161154.GC4369@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Turning off HOT/Cleanup sometimes  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: Turning off HOT/Cleanup sometimes  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Heikki Linnakangas wrote:
> On 04/15/2015 05:44 PM, Alvaro Herrera wrote:

> >Robert's proposal is "when reading a page, if dirty HOT-clean it; if not
> >dirty, also HOT-clean it but only 5 times in each scan".  This runs
> >HOT-cleanup some number of times (as many as there are dirty), and
> >causes at most 5 pages to become dirty.
> >
> >
> >Am I right in thinking that HOT-clean in a dirty page is something that
> >runs completely within CPU cache?  If so, it would be damn fast and
> >would have benefits for future readers, for very little cost.
> 
> If there are many tuples on the page, it takes some CPU effort to scan all
> the HOT chains and move tuples around. Also, it creates a WAL record, which
> isn't free.

But if the page is in CPU cache, the CPU effort shouldn't be all that
noticeable, should it?  That's my point, but then maybe I'm wrong.  Now,
the WAL logging is annoying, so let's limit that too -- do it at most
for, say, 20 dirty pages and at most 5 clean pages.

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



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

Предыдущее
От: "Zhang Zq"
Дата:
Сообщение: Bugs in CreateCheckPoint
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Bugs in CreateCheckPoint