pgsql: Rework lwlocknames.txt to become lwlocklist.h

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Rework lwlocknames.txt to become lwlocklist.h
Дата
Msg-id E1rmu72-004lE0-J9@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Catalog domain not-null constraints
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Review wording on tablespaces w.r.t. partitioned tables