Re: another autovacuum scheduling thread - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: another autovacuum scheduling thread
Date
Msg-id CAA5RZ0tWonKY=E5U51i-J8s2EcRoLqtUQyWv+pQ4_rjFKSn+AA@mail.gmail.com
Whole thread
In response to Re: another autovacuum scheduling thread  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: another autovacuum scheduling thread
List pgsql-hackers
> Good idea.  I put my own spin on it in the attached.  Please let me know
> what you think.

This look OK to me.

> > The current scaling calculation for force_vacuum could lead to
> > exorbitantly high scores.
> > Using DEBUG3 and consume_xids_until(2000000000), notice how the score goes
> > from 7.93 to 661828682916018.125 once past failsafe age.
> >
> > [...]
> >
> > Do you think it will be better to just to add the age to the
> > score?
>
> I mean, that's kind of the point.  Once a table surpasses one of the
> failsafe thresholds, we want its score to be so exorbitantly high that
> autovacuum is all but guaranteed to process it first.  I see no particular
> advantage to tempering the score in that case.

The main issue is that the scores can reach quadrillions, or even billions,
which feels excessive, especially if exposed in DEBUG3 or in a future
prioritization view.
So scaling the scores down seems like the right thing to do.

We could also do this by dividing the score by a large constant, or
use log10 to compress
the score. Both methods should keep the sort order unchanged.

However, If everyone agrees with the current approach, I will not push
back further.

--
Sami Imseih
Amazon Web Services (AWS)



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pg_waldump: support decoding of WAL inside tarfile
Next
From: Bruce Momjian
Date:
Subject: Re: on SGML files is used for what ?