Hi,

On Tue, Mar 04, 2025 at 03:24:26PM +0000, Bertrand Drouvot wrote:
> Like "more stats are always nice" I think that "more explanations in the doc" 
> are
> always nice, so I don't see any reason why not to add this extra explanation.

Attached an attempt to do so.

Note that it does not add extra explanation to "cost-based delay". If we feel 
the
need we could add a link to "<xref 
linkend="runtime-config-resource-vacuum-cost"/>"
like it has been done for delay_time in bb8dff9995f.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
>From 8c333bcb97541b1238602ae84ea85d4792a5577f Mon Sep 17 00:00:00 2001
From: Bertrand Drouvot <bertranddrouvot...@gmail.com>
Date: Wed, 12 Mar 2025 10:36:13 +0000
Subject: [PATCH v1] Add more details for pg_stat_all_tables

30a6ed0ce4b added the [auto]vacuum_time and [auto]analyze _time fields to
pg_stat_all_tables and bb8dff9995f added cost-based vacuum delay time to
progress views. This commit highlights the fact that the fields added in 30a6ed0ce4b
include the time spent sleeping due to cost-based delay.

Suggested-by: Magnus Hagander <mag...@hagander.net>
---
 doc/src/sgml/monitoring.sgml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
 100.0% doc/src/sgml/

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index aaa6586d3a4..a37ae4d2d1d 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -4047,7 +4047,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
        <structfield>total_vacuum_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Total time this table has been manually vacuumed, in milliseconds
+       Total time this table has been manually vacuumed, in milliseconds. (This
+       includes the time spent sleeping due to cost-based delay.)
       </para></entry>
      </row>
 
@@ -4057,7 +4058,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
       </para>
       <para>
        Total time this table has been vacuumed by the autovacuum daemon,
-       in milliseconds
+       in milliseconds. (This includes the time spent sleeping due to cost-based
+       delay.)
       </para></entry>
      </row>
 
@@ -4066,7 +4068,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
        <structfield>total_analyze_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Total time this table has been manually analyzed, in milliseconds
+       Total time this table has been manually analyzed, in milliseconds. (This
+       includes the time spent sleeping due to cost-based delay.)
       </para></entry>
      </row>
 
@@ -4076,7 +4079,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
       </para>
       <para>
        Total time this table has been analyzed by the autovacuum daemon,
-       in milliseconds
+       in milliseconds. (This includes the time spent sleeping due to cost-based
+       delay.)
       </para></entry>
      </row>
     </tbody>
-- 
2.34.1

Reply via email to