On Sat, Aug 06, 2022 at 04:09:28PM -0700, Peter Geoghegan wrote: > What are the chances that both thresholds will be crossed at *exactly* > (not approximately) the same time in a real world case, where the > table isn't tiny (tiny relative to the "autovacuum_naptime quantum")? > This is a very narrow case.
The threshold wouldn't need to be crossed within autovacuum_naptime, since all the workers might be busy. Consider autovacuum delay, analyze on long/wide tables, multiple extended stats objects, or autovacuum parameters which are changed off-hours by a cronjob. > It might make sense to *always* show how close we were to hitting each > of the thresholds, including the ones that we didn't end up hitting > (we may come pretty close quite often, which seems like it might > matter). But showing multiple conditions together just because the > planets aligned (we hit multiple thresholds together) emphasizes the > low-level mechanism, which is pretty far removed from anything that > matters. You might as well pick either threshold at random once this > happens -- even an expert won't be able to tell the difference. I don't have strong feelings about it; I'm just pointing out that the two of the conditions aren't actually exclusive. It seems like it could be less confusing to show both. Consider someone who is trying to *reduce* how often autovacuum runs, or give priority to some tables by raising the thresholds for other tables. -- Justin