Re: Vacuum statistics - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: Vacuum statistics
Date
Msg-id f4d067c7-8e3e-451a-b13e-28a08b3b871f@gmail.com
Whole thread Raw
In response to Re: Vacuum statistics  (Andrei Lepikhov <lepihov@gmail.com>)
Responses Re: Vacuum statistics
Re: Vacuum statistics
List pgsql-hackers
On 12/3/26 13:02, Andrei Lepikhov wrote:
> On 9/3/26 16:46, Alena Rybakina wrote:
>> I discovered that my last patches were incorrectly formed. I updated 
>> the correct version.
> 
> I see that v29-0001-* is a quite separate feature itself at the moment. 
> It makes sense to remove the commit message phrase for 
> vm_new_frozen_pages and vm_new_visible_pages, introduced in later patches.
> This patch itself looks good to me.

Since this patch is almost ready for commit, I reviewed it carefully. I 
noticed a documentation entry was missing, so I added it. Please see the 
attachment.
While updating the patch file, I also made a few small adjustments, 
including changing the parameter order in the struct and VIEW. The 
commit message is also fixed.

In addition, it makes sense to discuss how these parameters are supposed 
to be used. I see the following use cases:

1. Which tables have the most VM churn? - monitoring 
rev_all_visible_pages normalised on the table size and its average tuple 
width might expose the most suspicious tables (in terms of table 
statistics).
2. DML Skew. Dividing rev_all_visible_pages by the number of tuple 
updates/deletes, normalised by the average table and tuple sizes, might 
indicate whether changes are localised within the table.
3. IndexOnlyScan effectiveness. Considering the speed of 
rev_all_visible_pages change, normalised to the value of the 
relallvisible statistic, we may detect tables where Index-Only Scan 
might be inefficiently used.

Feel free to criticise it or add your own - I’m just a developer, not a 
DBA. Also, I’m not sure what use cases there are for the 
rev_all_frozen_pages parameter.

-- 
regards, Andrei Lepikhov,
pgEdge
Attachment

pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: [PATCH] Silence a new Valgrind warning
Next
From: Daniel Gustafsson
Date:
Subject: Re: Drop 32-bit support (was "Re: Fix typo 586/686 in atomics/arch-x86.h")