From 093e5c57d506783a95dd8feddd9a3f2651e1aeba Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 17 May 2023 11:18:35 -0700 Subject: 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 Reviewed-by: Kyotaro Horiguchi Reported-by: Andres Freund Discussion: https://postgr.es/m/20230419172326.dhgyo4wrrhulovt6%40awork3.anarazel.de --- doc/src/sgml/monitoring.sgml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 9842f820915..df5242fa80f 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3867,6 +3867,32 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i + + + + writebacks bigint + + + Number of units of size op_bytes which the process + requested the kernel write out to permanent storage. + + + + + + + + writeback_time double precision + + + Time spent in writeback operations in milliseconds (if + is enabled, otherwise zero). This + includes the time spent queueing write-out requests and, potentially, + the time spent to write out the dirty data. + + + + -- cgit v1.2.3