pgsql: Improve notation of BuiltinTrancheNames

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve notation of BuiltinTrancheNames
Date: 2024-01-24 14:04:38
Message-ID: E1rSdrq-002tIW-EL@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve notation of BuiltinTrancheNames

Use C99 designated initializer syntax for array elements, instead of
writing the position in a comment. This is less verbose and much more
readable. Akin to cc150596341e.

One disadvantage is that the BuiltinTrancheNames array now has a hole of
51 NULLs -- previously, the array elements were shifted 51 elements
downward to avoid this. This can be fixed by merging the
IndividualLWLockNames array into BuiltinTrancheNames, which would occupy
those 51 pointers, but because it requires some arguably ugly Meson
hackery, it's left for later.

Discussion: https://postgr.es/m/202401231025.gbv4nnte5fmm@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/74a73063106583b1f49274a2cd1df42e35107361

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 97 +++++++++++++--------------------------
1 file changed, 33 insertions(+), 64 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2024-01-24 15:43:09 pgsql: Add temporal PRIMARY KEY and UNIQUE constraints
Previous Message Michael Paquier 2024-01-24 07:55:38 pgsql: pgbench: Add \syncpipeline