1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +03:00

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 74a7306310, 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
This commit is contained in:
Alvaro Herrera
2024-03-20 11:46:11 +01:00
parent e5da0fe3c2
commit da952b415f
12 changed files with 136 additions and 125 deletions

View File

@@ -280,9 +280,9 @@ Extension "Waiting in an extension."
# This class of wait events has its own set of C structure, so these are
# only used for the documentation.
#
# NB: Predefined LWLocks (i.e., those declared in lwlocknames.txt) must be
# NB: Predefined LWLocks (i.e., those declared in lwlocklist.h) must be
# listed in the top section of locks and must be listed in the same order as in
# lwlocknames.txt.
# lwlocklist.h.
#
Section: ClassName - WaitEventLWLock
@@ -333,9 +333,9 @@ SerialControl "Waiting to read or update shared <filename>pg_serial</filename> s
#
# END OF PREDEFINED LWLOCKS (DO NOT CHANGE THIS LINE)
#
# Predefined LWLocks (i.e., those declared in lwlocknames.txt) must be listed
# Predefined LWLocks (i.e., those declared in lwlocknames.h) must be listed
# in the section above and must be listed in the same order as in
# lwlocknames.txt. Other LWLocks must be listed in the section below.
# lwlocknames.h. Other LWLocks must be listed in the section below.
#
XactBuffer "Waiting for I/O on a transaction status SLRU buffer."