From c07819738ba34e061f5ff3ac5e1419f83a11ddad Mon Sep 17 00:00:00 2001
From: Sami Imseih <simseih@amazon.com>
Date: Thu, 10 Apr 2025 08:49:50 -0500
Subject: [PATCH v1 2/2] Clarify when aborted and committed rows are tracked in
 pg_stat_all_tables

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.

Author: Sami Imseih <samimseih@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAA5RZ0sFabU2sAJft5JAqBwrQAbM3X81X-CGUY8CdOdVM%2B58Og%40mail.gmail.com
---
 doc/src/sgml/monitoring.sgml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index c421d89edff..7c43f2a5fa8 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -4097,6 +4097,15 @@ description | Waiting for a newly initialized WAL file to reach durable storage
    </tgroup>
   </table>
 
+  <note>
+   <para>
+    The <structfield>n_tup_ins</structfield>, <structfield>n_tup_upd</structfield>,
+    <structfield>n_tup_del</structfield>, and <structfield>n_ins_since_vacuum</structfield>
+    fields include rows from both committed and aborted transactions.
+    The <structfield>n_mod_since_analyze</structfield> field only includes rows from committed
+    transactions.
+   </para>
+  </note>
  </sect2>
 
  <sect2 id="monitoring-pg-stat-all-indexes-view">
-- 
2.39.5 (Apple Git-154)

