aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-01-28 09:57:32 +0900
committerMichael Paquier <michael@paquier.xyz>2025-01-28 09:57:32 +0900
commit30a6ed0ce4bb18212ec38cdb537ea4b43bc99b83 (patch)
tree43b178ff45834125c31b83393d38cf65a691a422 /doc/src
parent5afaba6297a8dd6999c8bc9f517a3ad38bd39652 (diff)
downloadpostgresql-30a6ed0ce4bb18212ec38cdb537ea4b43bc99b83.tar.gz
postgresql-30a6ed0ce4bb18212ec38cdb537ea4b43bc99b83.zip
Track per-relation cumulative time spent in [auto]vacuum and [auto]analyze
This commit adds four fields to the statistics of relations, aggregating the amount of time spent for each operation on a relation: - total_vacuum_time, for manual vacuum. - total_autovacuum_time, for vacuum done by the autovacuum daemon. - total_analyze_time, for manual analyze. - total_autoanalyze_time, for analyze done by the autovacuum daemon. This gives users the option to derive the average time spent for these operations with the help of the related "count" fields. Bump catalog version (for the catalog changes) and PGSTAT_FILE_FORMAT_ID (for the additions in PgStat_StatTabEntry). Author: Sami Imseih Reviewed-by: Bertrand Drouvot, Michael Paquier Discussion: https://postgr.es/m/CAA5RZ0uVOGBYmPEeGF2d1B_67tgNjKx_bKDuL+oUftuoz+=Y1g@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/monitoring.sgml38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index e5888fae2b5..4e917f159aa 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -4053,6 +4053,44 @@ description | Waiting for a newly initialized WAL file to reach durable storage
daemon
</para></entry>
</row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>total_vacuum_time</structfield> <type>double precision</type>
+ </para>
+ <para>
+ Total time this table has been manually vacuumed, in milliseconds
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>total_autovacuum_time</structfield> <type>double precision</type>
+ </para>
+ <para>
+ Total time this table has been vacuumed by the autovacuum daemon,
+ in milliseconds
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>total_analyze_time</structfield> <type>double precision</type>
+ </para>
+ <para>
+ Total time this table has been manually analyzed, in milliseconds
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>total_autoanalyze_time</structfield> <type>double precision</type>
+ </para>
+ <para>
+ Total time this table has been analyzed by the autovacuum daemon,
+ in milliseconds
+ </para></entry>
+ </row>
</tbody>
</tgroup>
</table>