Add writeback to pg_stat_io
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +26 −0 |
| src/backend/catalog/system_views.sql | modified | +2 −0 |
| src/backend/storage/buffer/bufmgr.c | modified | +25 −7 |
| src/backend/utils/activity/pgstat_io.c | modified | +8 −6 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +5 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +3 −3 |
| src/include/pgstat.h | modified | +2 −1 |
| src/include/storage/buf_internals.h | modified | +3 −2 |
| src/test/regress/expected/rules.out | modified | +3 −1 |
| src/test/regress/expected/stats.out | modified | +2 −2 |
| src/test/regress/sql/stats.sql | modified | +2 −2 |
Documentation touched
Discussion
- pg_stat_io not tracking smgrwriteback() is confusing 25 messages · 2023-04-19 → 2023-05-17