> On Fri, 11 Apr 2025 at 02:01, Sami Imseih <samimseih@gmail.com> wrote:
> > I created an entry for the July CF
> > https://commitfest.postgresql.org/patch/5691/
> >
> > ... and I realized I forgot to include David's code comment patch yesterday,
> > Reattaching both patches.
>
> I've pushed the code comment patch.
>
> For the docs patch, the fact you're having to name specific fields in
> the note at the bottom makes me think the details should be added to
> the row for the field in question instead.
Here is how per line will look like. Either way is fine with me.
with v2, I also did add the clarification in the pg_stat_database.tup_inserted|
updated|deleted fields as well.
I'm learning toward a hybrid. At the top:
"The tuple counters below, except where noted, are incremented even if the transaction aborts."
(We can leave it unwritten that if the description says live or dead tuples that qualifies as otherwise noted.)
The only exception I see that we need to note is: n_mod_since_analyze; which I would explain as opposed to simply noting the oddity.
"Estimated number of rows modified since this table was last analyzed. Aborted transactions are ignored here since they will not cause the statistics computed by analyze to change."
So, here are the relevant counters, with their treatment of aborted transaction tuples:
seq_tup_read - says live
idx_tup_fetch - says live
n_tup_ins - default notice
n_tup_upd - default notice
n_tup_del - default notice
n_tup_hot_upd - default notice (is this correct?)
n_tup_newpage_upd - default notice (is this correct?)
n_live_tup - says live (is this a counter?)
n_dead_tup - says dead (is this a counter?)
n_mod_since_analyze - inline reason for non-default
n_ins_since_vacuum - default notice
I'm also thinking to reword n_tup_upd, something like:
Total number of rows updated. Subsets of these updates are also tracked in n_tup_hot_upd and n_tup_newpage_upd to facilitate performance monitoring.
David J.
P.S. I'm trying to understand what it means for rows from aborted deletes to be counted (or not...).