pgsql: Generate pgstat_count_slru*() functions for slru using macros

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Generate pgstat_count_slru*() functions for slru using macros
Date: 2025-09-02 07:22:19
Message-ID: E1utLLP-0007UT-2W@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 850f4b4c8cab, 8018ffbf5895 or 83a1a1b56645.

Author: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Discussion: https://postgr.es/m/aLHA//gr4dTpDHHC(at)ip-10-97-1-34(dot)eu-west-3(dot)compute(dot)internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/eccba079c2ea7d6b40a02de774e773e3aaf4bdda

Modified Files
--------------
src/backend/access/transam/slru.c | 12 +++----
src/backend/utils/activity/pgstat_slru.c | 54 ++++++++++++--------------------
src/include/pgstat.h | 10 +++---
3 files changed, 31 insertions(+), 45 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2025-09-02 15:03:15 Re: pgsql: Preserve conflict-relevant data during logical replication.
Previous Message Amit Kapila 2025-09-02 03:44:07 pgsql: Add max_retention_duration option to subscriptions.