On Sat, Apr 26, 2025 at 08:31:32AM +0000, Bertrand Drouvot wrote: > On Sat, Apr 26, 2025 at 04:42:56PM +0900, Michael Paquier wrote: >> Splitting the values >> of the wait classes into their own header makes sense, but the header >> name wait_class_constants.h sounds a bit off. Why not a simpler >> "wait_classes.h" that gets included by wait_event.h and >> wait_event_types.h? > > Yeah, better. Done that way in the attached.
--- a/src/include/utils/wait_event.h +++ b/src/include/utils/wait_event.h @@ -10,21 +10,8 @@ [...] +/* wait classes */ +#include "utils/wait_classes.h" This part is not required. wait_event.h can survive the day even if it does not know about that. Note that it is true that wait_event.h could also work without wait_event_types.h, but it is more useful to keep it in wait_event.h as all the other code paths in need of the pgstat_report_* calls want to know about the wait event enums. I've reproduced your original report with clang-tidy on my end, removed the include that was not required in wait_event.h, fixed one comment, cross-checked that the result actually works, and applied the result. Thanks for the report! -- Michael
signature.asc
Description: PGP signature