Обсуждение: Do sys logger and stats collector need wait events WAIT_EVENT_SYSLOGGER_MAIN/_PGSTAT_MAIN?

Поиск
Список
Период
Сортировка

Do sys logger and stats collector need wait events WAIT_EVENT_SYSLOGGER_MAIN/_PGSTAT_MAIN?

От
Bharath Rupireddy
Дата:
Hi,

Although the pg_stat_activity has no entry for the sys logger and
stats collector (because of no shared memory access), the wait events
WAIT_EVENT_SYSLOGGER_MAIN and WAIT_EVENT_PGSTAT_MAIN are defined. They
seem to be unnecessary. Passing 0 or some other undefined wait event
value to the existing calls of WaitLatch and WaitLatchOrSocket instead
of WAIT_EVENT_SYSLOGGER_MAIN/WAIT_EVENT_PGSTAT_MAIN, would work. We
can delete these wait events and their info from pgstat.c.

I'm sure this is not so critical, but I'm just checking if someone
feels that they should be removed or have some other reasons for
keeping them.

Thoughts?

Regards,
Bharath Rupireddy.



Re: Do sys logger and stats collector need wait events WAIT_EVENT_SYSLOGGER_MAIN/_PGSTAT_MAIN?

От
Michael Paquier
Дата:
On Fri, Dec 03, 2021 at 12:42:47PM -0500, Tom Lane wrote:
> On the whole I'd be inclined to leave it alone.  Even if the reporting
> mechanisms aren't able to report these events today, maybe they'll
> be able to do so in future.  The context of the stats collector
> process, in particular, seems likely to change.

These come from 6f3bd98, where I am pretty sure that I (or Robert)
defined those values to not have users guess what to pass down to
WaitLatch(), assuming that this may become useful in the future.  So
I'd rather leave them be.
--
Michael

Вложения