Remove circular #include's between wait_event.h and wait_event_types.h
Michael Paquier <michael@paquier.xyz>
Remove circular #include's between wait_event.h and wait_event_types.h wait_event_types.h is generated by the code, and included wait_event.h. wait_event.h did the opposite move, including wait_event_types.h, causing a circular dependency between both. wait_event_types.h only needs to now about the wait event classes, so this information is moved into its own file, and wait_event_types.h uses this new header so as it does not depend anymore on wait_event.h. Note that such errors can be found with clang-tidy, with commands like this one: clang-tidy source_file.c --checks=misc-header-include-cycle -- \ -I/install/path/include/ -I/install/path/include/server/ Issue introduced by fa88928470b5. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/350192.1745768770@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/activity/generate-wait_event_types.pl | modified | +1 −1 |
| src/include/utils/wait_classes.h | added | +29 −0 |
| src/include/utils/wait_event.h | modified | +0 −16 |
Discussion
- Avoid circular header file dependency 11 messages · 2025-04-26 → 2025-07-07