pgsql: Rework lwlocknames.txt to become lwlocklist.h

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rework lwlocknames.txt to become lwlocklist.h
Date: 2024-03-20 11:28:04
Message-ID: E1rmu72-004lE0-J9@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/da952b415f4444fcc85ea79c3f006af142d3c90a

Modified Files
--------------
src/backend/Makefile | 4 +-
src/backend/storage/lmgr/.gitignore | 1 -
src/backend/storage/lmgr/Makefile | 9 +--
src/backend/storage/lmgr/generate-lwlocknames.pl | 60 ++++++++---------
src/backend/storage/lmgr/lwlock.c | 15 ++---
src/backend/storage/lmgr/lwlocknames.txt | 60 -----------------
src/backend/storage/lmgr/meson.build | 2 -
src/backend/utils/activity/wait_event_names.txt | 8 +--
src/include/storage/lwlock.h | 4 +-
src/include/storage/lwlocklist.h | 85 ++++++++++++++++++++++++
src/include/storage/meson.build | 12 ++--
src/tools/pginclude/headerscheck | 1 +
12 files changed, 136 insertions(+), 125 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2024-03-20 14:30:25 pgsql: Review wording on tablespaces w.r.t. partitioned tables
Previous Message Peter Eisentraut 2024-03-20 09:20:09 pgsql: Catalog domain not-null constraints