Re: RFE: Make statistics robust for unplanned events - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RFE: Make statistics robust for unplanned events
Date
Msg-id 1268658.1619130941@sss.pgh.pa.us
Whole thread Raw
In response to Re: RFE: Make statistics robust for unplanned events  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: RFE: Make statistics robust for unplanned events
List pgsql-hackers
Peter Geoghegan <pg@bowt.ie> writes:
> We already *almost* pay the full cost of durably storing the
> information used by autovacuum.c's relation_needs_vacanalyze() to
> determine if a VACUUM is required -- we're only missing
> new_dead_tuples/tabentry->n_dead_tuples. Why not go one tiny baby step
> further to fix this issue?

Definitely worth thinking about, but I'm a little confused about how
you see this working.  Those pg_class fields are updated by vacuum
(or analyze) itself.  How could they usefully serve as input to
autovacuum's decisions?

> Admittedly, storing new_dead_tuples durably is not sufficient to allow
> ANALYZE to be launched on schedule when there is a hard crash. It is
> also insufficient to make sure that insert-driven autovacuums get
> launched on schedule.

I'm not that worried about the former case, but the latter seems
like kind of a problem.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: RFE: Make statistics robust for unplanned events
Next
From: Andres Freund
Date:
Subject: Re: RFE: Make statistics robust for unplanned events