From dad557ab42420b7c390f81034029a8aabbc1de71 Mon Sep 17 00:00:00 2001 From: Sami Imseih Date: Fri, 11 Apr 2025 11:51:41 -0500 Subject: [PATCH v3 1/1] Clarify when aborted rows are tracked for tuple related counters. It is not obvious from the statistics collector documentation that tuple-related counters are incremented even when a transaction aborts, except for the n_mod_since_analyze counter, which only counts committed rows. Update the documentation to clarify this behavior. --- doc/src/sgml/monitoring.sgml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index c421d89edff..4f39f904ca2 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -278,6 +278,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser stated above; instead they update continuously throughout the transaction. + + An aborted transaction will also increment tuple-related counters, unless otherwise noted. + + Some of the information in the dynamic statistics views shown in is security restricted. @@ -3947,7 +3951,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage n_live_tup bigint - Estimated number of live rows + Estimated number of live rows (updated by committed transactions, or by + VACUUM and VACUUM FULL) @@ -3956,7 +3961,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage n_dead_tup bigint - Estimated number of dead rows + Estimated number of dead rows (updated by committed transactions, or by + VACUUM and VACUUM FULL) @@ -3966,6 +3972,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage Estimated number of rows modified since this table was last analyzed + (this only includes rows from commited transactions) -- 2.39.5 (Apple Git-154)