pgsql: Restrict pg_stat_io entries for data checksum processes

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Restrict pg_stat_io entries for data checksum processes
Date: 2026-07-17 11:18:10
Message-ID: E1wkga2-000bnX-0I@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Restrict pg_stat_io entries for data checksum processes

The data checksums launcher and workers were exposed in pg_stat_io
with the same broad set of object/context combinations as general
background workers. However, several of those entries can never
accumulate I/O statistics for these processes, such as bulkwrite,
relation init, temporary relation, and launcher vacuum entries.

Teach pgstat_tracks_io_object() and pgstat_tracks_io_op() about the
actual I/O performed by the data checksum processes. Keep the entries
needed for catalog scans, including bulkread catalog scans, worker
relation processing with a vacuum access strategy, and WAL writes and
initialization, while excluding WAL reads and other object/context
combinations that can never be used.

Author: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Discussion: https://postgr.es/m/CAHGQGwHz_-nt+YkHDMRZNBZrnoHro8cMOgSwuXEmSYT6vxgQ=w@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/32e4508db27d1fa3dc07404ad69d43ed97870f15

Modified Files
--------------
src/backend/utils/activity/pgstat_io.c | 33 +++++++++++++++++++++++++++++++++
src/test/regress/expected/stats.out | 9 +--------
2 files changed, 34 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2026-07-17 11:18:25 pgsql: Restrict pg_stat_io entries for data checksum processes
Previous Message Amit Kapila 2026-07-17 04:25:18 pgsql: Doc: Clarify DROP SUBSCRIPTION behavior after SET (slot_name = N