pgsql: bufmgr: Make buffer hit helper

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: bufmgr: Make buffer hit helper
Date: 2026-03-26 16:32:18
Message-ID: E1w5nd3-001ZE0-2e@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

bufmgr: Make buffer hit helper

Already two places count buffer hits, requiring quite a few lines of
code since we do accounting in so many places. Future commits will add
more locations, so refactor into a helper.

Author: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Reviewed-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Discussion: https://postgr.es/m/zljergweqti7x67lg5ije2rzjusie37nslsnkjkkby4laqqbfw@3p3zu522yykv

Branch
------
master

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

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 84 ++++++++++++++++++-------------------
1 file changed, 42 insertions(+), 42 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2026-03-26 19:06:40 pgsql: Address perlcritic complaint in response to 906a0469728
Previous Message Robert Haas 2026-03-26 16:06:10 pgsql: pg_plan_advice: Refactor to invent pgpa_planner_info