v4-0001-Clarify-when-aborted-rows-are-tracked-for-tuple-r.patch
application/octet-stream
Filename: v4-0001-Clarify-when-aborted-rows-are-tracked-for-tuple-r.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v4-0001
Subject: Clarify when aborted rows are tracked for tuple related counters.
| File | + | − |
|---|---|---|
| doc/src/sgml/monitoring.sgml | 10 | 3 |
From e7d9df953da30046107a8a187b4958cb6e00e132 Mon Sep 17 00:00:00 2001
From: Sami Imseih <simseih@amazon.com>
Date: Fri, 18 Apr 2025 14:13:22 -0500
Subject: [PATCH v4 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 | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index c421d89edff..93ca53da250 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.
</para>
+ <para>
+ An aborted transaction will also increment tuple-related counters, unless otherwise noted.
+ </para>
+
<para>
Some of the information in the dynamic statistics views shown in <xref
linkend="monitoring-stats-dynamic-views-table"/> is security restricted.
@@ -3947,7 +3951,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>n_live_tup</structfield> <type>bigint</type>
</para>
<para>
- Estimated number of live rows
+ Estimated number of live rows (updated by committed transactions, or by
+ <command>VACUUM</command> and <command>VACUUM FULL</command>)
</para></entry>
</row>
@@ -3956,7 +3961,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>n_dead_tup</structfield> <type>bigint</type>
</para>
<para>
- Estimated number of dead rows
+ Estimated number of dead rows (updated either by committed or aborted
+ transactions, or by <command>VACUUM</command> and <command>VACUUM FULL</command>)
</para></entry>
</row>
@@ -3965,7 +3971,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>n_mod_since_analyze</structfield> <type>bigint</type>
</para>
<para>
- Estimated number of rows modified since this table was last analyzed
+ Estimated number of rows modified (by committed transactions) since this table
+ was last analyzed
</para></entry>
</row>
--
2.39.5 (Apple Git-154)