Re: Making wait events a bit more efficient

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2021-04-02T20:44:22Z
Lists: pgsql-hackers
Hi,

On 2021-04-02 13:42:42 -0700, Zhihong Yu wrote:
> I don't see where my_wait_event_info is read (there is no getter method in
> the patch).

There are no reads via my_wait_event_info. Once connected to shared
memory, InitProcess() calls pgstat_set_wait_event_storage() to point it
to &MyProc->wait_event_info.

Greetings,

Andres Freund



Commits

  1. Improve efficiency of wait event reporting, remove proc.h dependency.

  2. Do not rely on pgstat.h to indirectly include storage/ headers.