Re: Skip vacuum log report code in lazy_scan_heap() if possible

Поиск
Список
Период
Сортировка
Искать
От
Michael Paquier
Тема
Re: Skip vacuum log report code in lazy_scan_heap() if possible
Дата
Msg-id
Yalqgvj+JFdYS8pp@paquier.xyz
Ответ на
Список
Дерево обсуждения
Skip vacuum log report code in lazy_scan_heap() if possible Greg Nancarrow <gregn4422@gmail.com>
Re: Skip vacuum log report code in lazy_scan_heap() if possible "Bossart, Nathan" <bossartn@amazon.com>
Re: Skip vacuum log report code in lazy_scan_heap() if possible "Bossart, Nathan" <bossartn@amazon.com>
Re: Skip vacuum log report code in lazy_scan_heap() if possible Michael Paquier <michael@paquier.xyz>
Re: Skip vacuum log report code in lazy_scan_heap() if possible Andres Freund <andres@anarazel.de>
On Thu, Dec 02, 2021 at 10:22:25PM +0000, Bossart, Nathan wrote:
> Since I have no further comments, I went ahead and marked this once as
> ready-for-committer.

Well, as you say, lazy_scan_heap() is only run once per relation, so
that's not a hot code path.  Looking at the callers of
message_level_is_interesting(), we apply that also in areas where a
lot of unnecessary work would be involved, like the drop of object 
dependencies or ProcSleep() (I recall that there were profiles where
standby replies in walsender.c could show up).  And based on the
amount of unnecessary work done at the end of lazy_scan_heap(), I'd
say that this is worth skipping, so let's do it.

There is always the argument that one may blindly add some logic at
the end of lazy_scan_heap(), causing it to be skipped depending on the
configuration, but that's unlikely going to happen after the activity
is logged, so I am fine to apply what you have here.  Let's wait a bit
to see if others have any objections, first.
--
Michael
В списке pgsql-hackers по дате отправления
От: Bossart, Nathan
Дата:
От: Michael Paquier
Дата:
FAQ