Add writeback to pg_stat_io
authorAndres Freund <andres@anarazel.de>
Wed, 17 May 2023 18:18:35 +0000 (11:18 -0700)
committerAndres Freund <andres@anarazel.de>
Wed, 17 May 2023 18:18:35 +0000 (11:18 -0700)
commit093e5c57d506783a95dd8feddd9a3f2651e1aeba
tree95de46d45e866ed9a059a18f546690e675370cb8
parent52676dc2e016df5cd842a4f6073b25ee8e681b9f
Add writeback to pg_stat_io

28e626bde00 added the concept of IOOps but neglected to include writeback
operations. ac8d53dae5 added time spent doing these I/O operations. Without
counting writeback, checkpointer write time in the log often differed
substantially from that in pg_stat_io. To fix this, add IOOp IOOP_WRITEBACK
and track writeback in pg_stat_io.

Bumps catversion.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reported-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20230419172326.dhgyo4wrrhulovt6%40awork3.anarazel.de
12 files changed:
doc/src/sgml/monitoring.sgml
src/backend/catalog/system_views.sql
src/backend/storage/buffer/bufmgr.c
src/backend/utils/activity/pgstat_io.c
src/backend/utils/adt/pgstatfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/include/pgstat.h
src/include/storage/buf_internals.h
src/test/regress/expected/rules.out
src/test/regress/expected/stats.out
src/test/regress/sql/stats.sql