On Fri, Mar 20, 2026 at 1:31 PM Nathan Bossart <[email protected]> wrote: > > Thanks for the feedback. Here is an updated patch. > > I kept the comment about the weight parameters in autovacuum.c. Since > there's a bunch of code related to them, IMHO we should have an explanatory > note somewhere.
Hi Nathan, Thank you for working on this feature. I'm late to this thread. I read the patch, and here are some general thoughts. I haven't read the full thread, so some of these thoughts may be repetitive - thanks for bearing with me. 1/ The Autovacuum Prioritization section in the docs is a good start for explaining the usage aspects of the new scoring system. However, IMHO, adding a couple of production-like scenarios showing how these scores need to be adjusted and used would be a good addition to this section. 2/ Any plans to extend the new scoring system to the table level (i.e., reloptions)? I think it would help in situations where there are huge tables that need to be prioritized for vacuum over others, so setting the scoring high for those tables would allow the next autovacuum to pick them up first. 3/ Any plans to add tests to demo how each of these parameters could help in various situations - when the system needs freezing to be prioritized for avoiding XID wraparound over cleaning up dead tuples, and when it needs analyze to be prioritized to get correct plans, etc.? If needed, we could add elog(DEBUGX) messages to emit the reason or effectiveness of these new scores so that we can verify them in tests. 4/ Is adding a reason (such as how each of these scores influenced the autovacuum to pick this table) to vacuum progress reporting a good idea? This helps answer some of the why and how questions when the autovacuum is in progress. -- Bharath Rupireddy Amazon Web Services: https://aws.amazon.com
