From ae6ba13f4635e70cef32e863996aedfcdccef209 Mon Sep 17 00:00:00 2001 From: Sami Imseih Date: Thu, 10 Apr 2025 19:22:47 -0500 Subject: [PATCH v2 1/1] Clarify when aborted rows are tracked in pg_stat_all_tables/pg_stat_database Update the documentation for the pg_stat_all_tables.n_tup_*, n_ins_since_vacuum, and n_mod_since_analyze fields to reflect that these fields track both committed and aborted transactions. --- doc/src/sgml/monitoring.sgml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index c421d89edff..626b790ebbc 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3439,6 +3439,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage Number of rows inserted by queries in this database + (including rows from aborted transactions) @@ -3448,6 +3449,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage Number of rows updated by queries in this database + (including rows from aborted transactions) @@ -3457,6 +3459,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage Number of rows deleted by queries in this database + (including rows from aborted transactions) @@ -3892,7 +3895,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage n_tup_ins bigint - Total number of rows inserted + Total number of rows inserted (including rows from aborted transactions) @@ -3903,8 +3906,9 @@ description | Waiting for a newly initialized WAL file to reach durable storage Total number of rows updated. (This includes row updates counted in n_tup_hot_upd and - n_tup_newpage_upd, and remaining - non-HOT updates.) + n_tup_newpage_upd, as well as + remaining non-HOT updates and rows updated + in aborted transactions.) @@ -3913,7 +3917,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage n_tup_del bigint - Total number of rows deleted + Total number of rows deleted (including rows from aborted transactions) @@ -3966,6 +3970,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage Estimated number of rows modified since this table was last analyzed + (not including rows from aborted transactions) @@ -3975,6 +3980,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage Estimated number of rows inserted since this table was last vacuumed + (including rows from aborted transactions) -- 2.39.5 (Apple Git-154)