diff options
author | Nathan Bossart <nathan@postgresql.org> | 2024-01-09 11:05:19 -0600 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2024-01-09 11:05:19 -0600 |
commit | 5b1b9bce84497ec71dbd6d5a969e8fc5aa22b4ef (patch) | |
tree | 46d71cb6eaf4f5fc63c2327d03b94f3d4c2b07b1 /src/include | |
parent | a7be2a6c262d5352756d909b29c419ea5e5fa1d9 (diff) |
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
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/storage/meson.build | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/storage/meson.build b/src/include/storage/meson.build index 2a88248464e..666fb22408e 100644 --- a/src/include/storage/meson.build +++ b/src/include/storage/meson.build @@ -1,7 +1,9 @@ # Copyright (c) 2022-2024, PostgreSQL Global Development Group lwlocknames = custom_target('lwlocknames', - input: files('../../backend/storage/lmgr/lwlocknames.txt'), + input: files( + '../../backend/storage/lmgr/lwlocknames.txt', + '../../backend/utils/activity/wait_event_names.txt'), output: ['lwlocknames.h', 'lwlocknames.c'], command: [ perl, files('../../backend/storage/lmgr/generate-lwlocknames.pl'), |