Rework lwlocknames.txt to become lwlocklist.h
commitda952b415f4444fcc85ea79c3f006af142d3c90a
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 20 Mar 2024 10:46:11 +0000 (20 11:46 +0100)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 20 Mar 2024 10:55:20 +0000 (20 11:55 +0100)
treea2467107f000c93367df5041701d8dc401b3ed9a
parente5da0fe3c22b34c4433f1729e88495554b5331ed
Rework lwlocknames.txt to become lwlocklist.h

This way, we can fold the list of lock names to occur in
BuiltinTrancheNames instead of having its own separate array.  This
saves two lines of code in GetLWTrancheName and some space in
BuiltinTrancheNames, as foreseen in commit 74a730631065, as well as
removing the need for a separate lwlocknames.c file.

We still have to build lwlocknames.h using Perl code, which initially I
wanted to avoid, but it gives us the chance to cross-check
wait_event_names.txt.

Discussion: https://postgr.es/m/202401231025.gbv4nnte5fmm@alvherre.pgsql
12 files changed:
src/backend/Makefile
src/backend/storage/lmgr/.gitignore
src/backend/storage/lmgr/Makefile
src/backend/storage/lmgr/generate-lwlocknames.pl
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/lwlocknames.txt [deleted file]
src/backend/storage/lmgr/meson.build
src/backend/utils/activity/wait_event_names.txt
src/include/storage/lwlock.h
src/include/storage/lwlocklist.h [new file with mode: 0644]
src/include/storage/meson.build
src/tools/pginclude/headerscheck