Re: Turning off HOT/Cleanup sometimes

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Turning off HOT/Cleanup sometimes
Дата
Msg-id CA+Tgmobfw8kc+YNXevr45msFZPyc6xJS=KsmX3Awz-mSXQXLCA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Turning off HOT/Cleanup sometimes  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Turning off HOT/Cleanup sometimes  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On Wed, Apr 15, 2015 at 3:37 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 14 April 2015 at 21:53, Robert Haas <robertmhaas@gmail.com> wrote:
>> Peter commented previously that README.HOT should get an update.  The
>> relevant section seems to be "When can/should we prune or
>> defragment?".
>
> That's easy enough to change once we agree to commit.
>
>> I wonder if it would be a useful heuristic to still prune pages if
>> those pages are already dirty.
>
> Useful for who? This is about responsibility. Why should someone
> performing a large SELECT take the responsibility for cleaning pages?

Because it makes it subsequent accesses to the page cheaper.  Of
course, that applies in all cases, but when the page is already dirty,
the cost of pruning it is probably quite small - we're going to have
to write the page anyway, and pruning it before it gets evicted
(perhaps even by our scan) will be cheaper than writing it now and
writing it again after it's pruned.  When the page is clean, the cost
of pruning is significantly higher.

I won't take responsibility for paying my neighbor's tax bill, but I
might take responsibility for picking up his mail while he's on
holiday.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Move pg_upgrade from contrib/ to src/bin/
Следующее
От: Michael Paquier
Дата:
Сообщение: TAP tests of pg_rewind not stopping servers used for the tests