Re: Is heap_page_prune() stats collector accounting wrong?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Is heap_page_prune() stats collector accounting wrong?
Дата
Msg-id CAH2-WzmQmLn4=Lau7S3HkLAU6ZEUWmQceRqyKQq33O58BK4Z3g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is heap_page_prune() stats collector accounting wrong?  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Fri, Nov 12, 2021 at 11:29 AM Peter Geoghegan <pg@bowt.ie> wrote:
> We compensate here precisely because we are not running in VACUUM (it
> has to be an opportunistic prune in practice).

> If we're not running in VACUUM, and have to make a statistics
> collector call, then we don't want to forget about DEAD tuples that
> were pruned-away (i.e. no longer have tuple storage) when they still
> have an LP_DEAD stub item. There is obviously no justification for
> just ignoring LP_DEAD items there, because we don't know when VACUUM
> is going to run next (since we are not VACUUM).

Attached patch clears this up by adding some comments. It also moves
the call to pgstat_update_heap_dead_tuples() from heap_page_prune() to
heap_page_prune_opt(), which feels like a better place for it to me.

-- 
Peter Geoghegan

Вложения

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

Предыдущее
От: Joshua Brindle
Дата:
Сообщение: Re: [PATCH v2] use has_privs_for_role for predefined roles
Следующее
От: Tom Lane
Дата:
Сообщение: Re: simplifying foreign key/RI checks