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

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Skip vacuum log report code in lazy_scan_heap() if possible
Дата
Msg-id 20211203011344.lkxqyzhnm6jopubh@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Skip vacuum log report code in lazy_scan_heap() if possible  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,

On 2021-12-03 09:53:22 +0900, Michael Paquier wrote:
> 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.

Yea, it seems like a premature optimization.


> 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.

I think this mostly reduces the coverage of the relevant code without any
measurable speed gain. -0.5 from here.

Greetings,

Andres Freund



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

Предыдущее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: Temporary tables versus wraparound... again
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: keepliaves etc. as environment variables