Generate pgstat_count_slru*() functions for slru using macros
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-08-29T15:02:23Z
Lists: pgsql-hackers
Attachments
Hi hackers, I was looking at pgstat_slru.c (I've in mind to provide some of those metrics per backend), and realized that the same code pattern is repeated 7 times. PFA a patch to $SUBJECT, removing a few lines of originally-duplicated code patterns. In passing, some functions have to be renamed to match their associated counter. This is the same idea as 850f4b4, 8018ffb or 83a1a1b. Looking forward to your feedback, Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
-
Generate pgstat_count_slru*() functions for slru using macros
- eccba079c2ea 19 (unreleased) landed