pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rework lwlocknames.txt to become lwlocklist.h
Date: Wed, 20 Mar 2024 11:28:04 +0000
Message-ID: <E1rmu72-004lE0-J9@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1rmu72-004lE0-J9@gemulon.postgresql.org>
Permalink:  ../E1rmu72-004lE0-J9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rmu72-004lE0-J9@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Rework lwlocknames.txt to become lwlocklist.h
  In-Reply-To: <E1rmu72-004lE0-J9@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox