pgsql: Add index scan pgstat test coverage.

Started by Peter Geoghegan3 months ago1 messagescommitters
Jump to latest

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@bowt.ie>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Discussion: /messages/by-id/CAH2-Wz=V0V5WGuo85D-OF+TM_CxU3q=MMkY-ebY0K8xc-9Xykw@mail.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(+)