Generate pgstat_count_slru*() functions for slru using macros
authorMichael Paquier <michael@paquier.xyz>
Tue, 2 Sep 2025 07:22:03 +0000 (16:22 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 2 Sep 2025 07:22:03 +0000 (16:22 +0900)
commiteccba079c2ea7d6b40a02de774e773e3aaf4bdda
treeb60e65c82657ef61268d5139f2b22ae960b96960
parenta850be2fe653b3b529969946c1cefe0fd9e34a8d
Generate pgstat_count_slru*() functions for slru using macros

This change replaces seven functions definitions by macros, reducing a
bit some repetitive patterns in the code.  An interesting side effect is
that this removes an inconsistency in the naming of SLRU increment
functions with the field names.

This change is similar to 850f4b4c8cab8018ffbf5895 or 83a1a1b56645.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/aLHA//gr4dTpDHHC@ip-10-97-1-34.eu-west-3.compute.internal
src/backend/access/transam/slru.c
src/backend/utils/activity/pgstat_slru.c
src/include/pgstat.h