Cross-check lists of predefined LWLocks.
Nathan Bossart <nathan@postgresql.org>
Cross-check lists of predefined LWLocks. Both lwlocknames.txt and wait_event_names.txt contain a list of all the predefined LWLocks, i.e., those with predefined positions within MainLWLockArray. It is easy to miss one or the other, especially since the list in wait_event_names.txt omits the "Lock" suffix from all the LWLock wait events. This commit adds a cross- check of these lists to the script that generates lwlocknames.h. If the lists do not match exactly, building will fail. Suggested-by: Robert Haas Reviewed-by: Robert Haas, Michael Paquier, Bertrand Drouvot Discussion: https://postgr.es/m/20240102173120.GA1061678%40nathanxps13
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/Makefile | modified | +1 −1 |
| src/backend/storage/lmgr/generate-lwlocknames.pl | modified | +49 −0 |
| src/backend/storage/lmgr/Makefile | modified | +2 −2 |
| src/backend/utils/activity/wait_event_names.txt | modified | +12 −0 |
| src/include/storage/meson.build | modified | +3 −1 |
Discussion
- verify predefined LWLocks have entries in wait_event_names.txt 19 messages · 2024-01-02 → 2024-01-09