Re: Not HOT enough

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Not HOT enough
Дата
Msg-id 507.1322072158@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Not HOT enough  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Not HOT enough  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Wed, Nov 23, 2011 at 5:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Simon Riggs <simon@2ndQuadrant.com> writes:
>>> Normal catalog access does not use HOT and never has.

>> You are mistaken.

> Normal catalog access against shared catalogs via heap_scan does not
> use HOT cleanup, because it uses SnapshotNow.

Not sure what you are basing these statements on.  Normal catalog access
typically goes through indexam.c, which AFAICS will call
heap_page_prune_opt on every heap page it visits, quite independently
of what snapshot is used.  There are no cases I know of where the system
prefers heapscans on catalogs, except possibly pg_am which is known to
be small.

> However, since we're talking about these tables only
> ...
> then I think it's fair to say that they are seldom updated/deleted and
> so the effect of HOT cleanup is not important for those tables.

I agree with Alvaro that pg_shdepend is probably a bit too volatile
to make such an assumption safe.

> The real question is do we favour HOT cleanup on those small 8 tables,
> or do we favour HOT cleanup of every other table?

No, the real question is why not think a little harder and see if we can
come up with a solution that doesn't involve making some cases worse to
make others better.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Not HOT enough
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Not HOT enough