pgsql: Add index scan pgstat test coverage.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add index scan pgstat test coverage.
Date: 2026-09-03 20:27:30
Message-ID: E1x2E1x-00000003MKO-2gxT@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add index scan pgstat test coverage.

Add tests that verify the exact values of the idx_tup_read and
idx_tup_fetch counters in pg_stat_all_indexes. There was no existing
coverage of pg_stat_all_indexes, beyond some counter reset tests;
idx_tup_read and idx_tup_fetch had no tests at all.

This is preparation for an upcoming commit that will move index scan
heap fetches behind a new slot-based table AM interface, relocating the
code that maintains these counters.

Author: Peter Geoghegan <pg(at)bowt(dot)ie>
Reviewed-by: Tomas Vondra <tomas(at)vondra(dot)me>
Discussion: https://postgr.es/m/CAH2-Wz%3DV0V5WGuo85D-OF%2BTM_CxU3q%3DMMkY-ebY0K8xc-9Xykw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/83032dc42cab67dfdd33152d08434785977f069f

Modified Files
--------------
src/test/regress/expected/stats.out | 62 +++++++++++++++++++++++++++++++++++++
src/test/regress/sql/stats.sql | 32 +++++++++++++++++++
2 files changed, 94 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2026-09-03 21:11:18 pgsql: Auto-vectorize the varbit bitwise operators.
Previous Message Nathan Bossart 2026-09-03 20:16:27 pgsql: Convert PROC_HDR->startupBufferPinWaitBufId to a Buffer.