Bharath Rupireddy <bharath.rupireddyforpostg...@gmail.com> writes:
> 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.

Well ... mumble.  The fact that these events are defined would lead
people to wonder why they're not hit, so there's a documentation reason
to get rid of them.  However, I quite dislike the suggestion of "just
pass zero"; that will probably draw compiler warnings, or if it doesn't
it should.  We'd have to invent some other "unused" wait event, and
then it's not clear that we've made any gain in intelligibility.

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.

                        regards, tom lane


Reply via email to