agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Allow IO time to be counted without a matching IO operation in p 2+ messages / 1 participants [nested] [flat]
* pgsql: Allow IO time to be counted without a matching IO operation in p @ 2026-07-31 21:47 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Melanie Plageman @ 2026-07-31 21:47 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow IO time to be counted without a matching IO operation in pg_stat_io Since 999dec9ec6a816680, pg_stat_io can show read time with zero reads for an IO Context: a foreign IO is counted as a read only in the initiating backend, while other waiters record only the wait time. That violates pgstat_bktype_io_stats_valid(). Relax the check to allow time without a matching operation count, since we want to count read wait time even in backends that did not initiate the read. This also enables future accounting of waits on IO resources (e.g., AIO handles) in backends that didn't start the IO. Author: Andrey Rachitskiy <pl0h0yp1@gmail.com> Reported-by: Justin Pryzby <pryzby@telsasoft.com> Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru> Discussion: https://postgr.es/m/ak5lccE4qiQpOBHn@pryzbyj2023 Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c9a669492719db2fe45cd17259ae0fc3bc4d91c5 Modified Files -------------- doc/src/sgml/monitoring.sgml | 4 +++- src/backend/storage/buffer/bufmgr.c | 8 ++++---- src/backend/utils/activity/pgstat_io.c | 22 +++++++--------------- 3 files changed, 14 insertions(+), 20 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Allow IO time to be counted without a matching IO operation in p @ 2026-07-31 21:48 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Melanie Plageman @ 2026-07-31 21:48 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow IO time to be counted without a matching IO operation in pg_stat_io Since 999dec9ec6a816680, pg_stat_io can show read time with zero reads for an IO Context: a foreign IO is counted as a read only in the initiating backend, while other waiters record only the wait time. That violates pgstat_bktype_io_stats_valid(). Relax the check to allow time without a matching operation count, since we want to count read wait time even in backends that did not initiate the read. This also enables future accounting of waits on IO resources (e.g., AIO handles) in backends that didn't start the IO. Author: Andrey Rachitskiy <pl0h0yp1@gmail.com> Reported-by: Justin Pryzby <pryzby@telsasoft.com> Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru> Discussion: https://postgr.es/m/ak5lccE4qiQpOBHn@pryzbyj2023 Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d6792cc58e9c0aead136f381052151e1c246b534 Modified Files -------------- doc/src/sgml/monitoring.sgml | 4 +++- src/backend/storage/buffer/bufmgr.c | 8 ++++---- src/backend/utils/activity/pgstat_io.c | 22 +++++++--------------- 3 files changed, 14 insertions(+), 20 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-07-31 21:48 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-31 21:47 pgsql: Allow IO time to be counted without a matching IO operation in p Melanie Plageman <melanieplageman@gmail.com> 2026-07-31 21:48 pgsql: Allow IO time to be counted without a matching IO operation in p Melanie Plageman <melanieplageman@gmail.com>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox