Re: Introduce some randomness to autovacuum

2025-05-01 Thread Junwang Zhao
Hi David, On Thu, May 1, 2025 at 2:15 PM David Rowley wrote: > > On Thu, 1 May 2025 at 17:35, Junwang Zhao wrote: > > > > On Thu, May 1, 2025 at 8:12 AM David Rowley wrote: > > > It sounds like the aim is to fix the problem with autovacuum vacuuming > > > the same table over and over and being

Re: Introduce some randomness to autovacuum

2025-04-30 Thread David Rowley
On Thu, 1 May 2025 at 17:35, Junwang Zhao wrote: > > On Thu, May 1, 2025 at 8:12 AM David Rowley wrote: > > It sounds like the aim is to fix the problem with autovacuum vacuuming > > the same table over and over and being unable to remove enough dead > > tuples due to something holding back the o

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Junwang Zhao
On Thu, May 1, 2025 at 8:12 AM David Rowley wrote: > > On Thu, 1 May 2025 at 03:29, Nathan Bossart wrote: > > That being said, I am -1 for this proposal. Autovacuum parameters and > > scheduling are already quite complicated, and making it nondeterministic > > would add an additional layer of co

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Junwang Zhao
Hi Sami, On Thu, May 1, 2025 at 1:56 AM Sami Imseih wrote: > > > Yes, it is masking the problem, but maybe a better way to think about it is > > that it is delaying the > > performance impact, allowing more time for a manual intervention of the > > problematic table(s). > > I question how the u

Re: Introduce some randomness to autovacuum

2025-04-30 Thread David Rowley
On Thu, 1 May 2025 at 03:29, Nathan Bossart wrote: > That being said, I am -1 for this proposal. Autovacuum parameters and > scheduling are already quite complicated, and making it nondeterministic > would add an additional layer of complexity (and may introduce its own > problems). But more imp

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Robert Treat
On Wed, Apr 30, 2025 at 1:56 PM Sami Imseih wrote: > > > Yes, it is masking the problem, but maybe a better way to think about it is > > that it is delaying the > > performance impact, allowing more time for a manual intervention of the > > problematic table(s). > > I question how the user will

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Sami Imseih
> Yes, it is masking the problem, but maybe a better way to think about it is > that it is delaying the > performance impact, allowing more time for a manual intervention of the > problematic table(s). I question how the user will gauge the success of setting the strategy to "random"? They may m

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Greg Sabino Mullane
On Wed, Apr 30, 2025 at 10:07 AM Junwang Zhao wrote: > I ended up with adding a guc configuration that may support different > vacuum > strategies. +1 to this: it's a good solution to a tricky problem. I would be a -1 if this were not a GUC. Yes, it is masking the problem, but maybe a better w

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Sami Imseih
> - Spinning. Running repeatedly on the same table but not accomplishing > anything useful. > But more importantly, IMHO it masks the problems instead of > solving them more directly, and it could mask future problems, too To add more to Nathan's comment about masking future problems, this will n

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Nathan Bossart
On Fri, Apr 25, 2025 at 10:02:49PM +0800, Junwang Zhao wrote: > After watching Robert's talk[1] on autovacuum and participating in the related > workshop yesterday, it appears that people are inclined to use prioritization > to address the issues highlighted in Robert's presentation. Here I list tw

Re: Introduce some randomness to autovacuum

2025-04-30 Thread Junwang Zhao
Hi Nikita, wenhui, On Fri, Apr 25, 2025 at 11:16 PM Nikita Malakhov wrote: > > Hi! > > I agree it is a good idea to shift the table list. Although vacuuming larger > tables first > is a questionable approach because smaller ones could wait a long time to be > vacuumed. > It looks like the most

Re: Introduce some randomness to autovacuum

2025-04-25 Thread Nikita Malakhov
Hi! I agree it is a good idea to shift the table list. Although vacuuming larger tables first is a questionable approach because smaller ones could wait a long time to be vacuumed. It looks like the most obvious and simple way is that the first table to be vacuumed should not be the first one from

Re: Introduce some randomness to autovacuum

2025-04-25 Thread wenhui qiu
Hi,I like your idea,It would be even better if the weights could be taken according to the larger tables On Fri, 25 Apr 2025 at 22:03, Junwang Zhao wrote: > Hi hackers, > > After watching Robert's talk[1] on autovacuum and participating in the > related > workshop yesterday, it appears that peop

Introduce some randomness to autovacuum

2025-04-25 Thread Junwang Zhao
Hi hackers, After watching Robert's talk[1] on autovacuum and participating in the related workshop yesterday, it appears that people are inclined to use prioritization to address the issues highlighted in Robert's presentation. Here I list two of the failure modes that were discussed. - Spinning