> I've been thinking about whether to also return whether autovacuum is
> enabled in the view, i.e., AutoVacuumingActive() && av_enabled.
I don't think we can rely on AutoVacuumingActive() being stable since a
backend that does a SET track_counts = off for whatever reason and
then calls the view will get false. av_enabled will likely be the only
thing we can report.
> So, I'm
> currently leaning towards leaving that information out for now.
I agree.
>
> scores->needs_vacuum = (vactuples > vacthresh);
> *do_vacuum |= (av_enabled && scores->needs_vacuum);
>
> ... but others might find your version easier to read.
yeah, for readability, I'll stick with the current.
> Otherwise, 0001 looks good.
>
> In 0003, I think you missed renaming the last argument to
> compute_autovac_score() in table_recheck_autovac().
Earlier, I did not compile with 0003 only. Fixed.
> I didn't see anything else in this read-through. I'm planning to start
> preparing this for commit tomorrow.
Thanks! here is v7
--
Sami