Re: Making wait events a bit more efficient

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org, Robert Haas <robertmhaas@gmail.com>
Date: 2021-04-03T19:08:36Z
Lists: pgsql-hackers
On 2021-04-02 19:55:16 -0700, Andres Freund wrote:
> On 2021-04-02 12:44:58 -0700, Andres Freund wrote:
> > If we went for the my_wait_event_info approach there is one further
> > advantage, after my change to move the wait event code into a separate
> > file: wait_event.h does not need to include proc.h anymore, which seems
> > architecturally nice for things like fd.c.
> 
> That part turns out to make one aspect of the shared memory stats patch
> cleaner, so I am planning to push this commit fairly soon, unless
> somebody sees a reason not to do so?

Done.



Commits

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

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