Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition
Date
Msg-id 20220806225155.GV19644@telsasoft.com
Whole thread Raw
In response to Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition
List pgsql-hackers
On Sat, Aug 06, 2022 at 03:41:57PM -0700, Peter Geoghegan wrote:
> > > Note that a VACUUM that is an "automatic vacuum for inserted tuples" cannot
> > > [...] also be a "regular" autovacuum/VACUUM
> >
> > Why not ?

I think maybe you missed my intent in trimming the "anti-wraparound" part of
your text.

My point was concerning your statement that "autovacuum for inserted tuples ..
cannot also be a regular autovacuum" (meaning triggered by dead tuples).

> Well, autovacuum.c should have (and/or kind of already has) 3
> different triggering conditions. These are mutually exclusive
> conditions -- technically autovacuum.c always launches an autovacuum
> against a table because exactly 1 of the 3 thresholds were crossed.

The issue being that both thresholds can be crossed:

>> 2022-08-06 16:47:47.674 CDT autovacuum worker[12707] DEBUG:  t: VAC: 99999 (THRESHOLD 50), INS: 99999 (THRESHOLD
1000),anl: 199998 (threshold 50)
 

-- 
Justin



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cleaning up historical portability baggage
Next
From: Tom Lane
Date:
Subject: Re: Cleaning up historical portability baggage