Re: Confine vacuum skip logic to lazy_scan_skip

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Confine vacuum skip logic to lazy_scan_skip
Дата
Msg-id CAH2-Wznr+=OHf-eAqO_DMHA0Y2_W8y_foHoxY4cGmRhkt-+D5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Confine vacuum skip logic to lazy_scan_skip  (Melanie Plageman <melanieplageman@gmail.com>)
Ответы Re: Confine vacuum skip logic to lazy_scan_skip  (Peter Geoghegan <pg@bowt.ie>)
Re: Confine vacuum skip logic to lazy_scan_skip  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
On Fri, Mar 8, 2024 at 10:48 AM Melanie Plageman
<melanieplageman@gmail.com> wrote:
> Not that it will be fun to maintain another special case in the VM
> update code in lazy_scan_prune(), but we could have a special case
> that checks if DISABLE_PAGE_SKIPPING was passed to vacuum and if
> all_visible_according_to_vm is true and all_visible is true, we update
> the VM but don't dirty the page.

It wouldn't necessarily have to be a special case, I think.

We already conditionally set PD_ALL_VISIBLE/call PageIsAllVisible() in
the block where lazy_scan_prune marks a previously all-visible page
all-frozen -- we don't want to dirty the page unnecessarily there.
Making it conditional is defensive in that particular block (this was
also added by this same commit of mine), and avoids dirtying the page.

Seems like it might be possible to simplify/consolidate the VM-setting
code that's now located at the end of lazy_scan_prune. Perhaps the two
distinct blocks that call visibilitymap_set() could be combined into
one.

--
Peter Geoghegan



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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Support a wildcard in backtrace_functions
Следующее
От: "Tristan Partin"
Дата:
Сообщение: Re: meson: Specify -Wformat as a common warning flag for extensions