Improve notation of BuiltinTrancheNames
commit74a73063106583b1f49274a2cd1df42e35107361
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 24 Jan 2024 14:01:30 +0000 (24 15:01 +0100)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 24 Jan 2024 14:01:30 +0000 (24 15:01 +0100)
tree112d7b6748910d3fca405f56cd0d868e945fe78b
parent94edfe250c6a200d2067b0debfe00b4122e9b11e
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
src/backend/storage/lmgr/lwlock.c