Re: n_ins_since_vacuum stats for aborted transactions - Mailing list pgsql-hackers

From David Rowley
Subject Re: n_ins_since_vacuum stats for aborted transactions
Date
Msg-id CAApHDvopVdM7jE32i+i_EVV9Gseqq4kz7cJad8hx9ktSV+NREw@mail.gmail.com
Whole thread Raw
In response to Re: n_ins_since_vacuum stats for aborted transactions  (Sami Imseih <samimseih@gmail.com>)
Responses Re: n_ins_since_vacuum stats for aborted transactions
List pgsql-hackers
On Sat, 12 Apr 2025 at 07:33, Sami Imseih <samimseih@gmail.com> wrote:
> What do you think of the attached?

I looked at the v3 patch and I'm having trouble getting excited about it.

I'd say this part is misleading:

@@ -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 by committed transactions, or by
+       <command>VACUUM</command> and <command>VACUUM FULL</command>)
       </para></entry>

An aborted insert will contribute to that counter, but that's not mentioned.

Would it be ok just to adjust n_mod_since_analyze's "Estimated number
of rows modified since this table was last analyzed" and inject "by
committed transactions" after "modified", then call it a day?

David



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Changing shared_buffers without restart
Next
From: Amit Kapila
Date:
Subject: Re: Fix slot synchronization with two_phase decoding enabled