mirror of
https://github.com/postgres/postgres.git
synced 2026-07-15 20:52:53 -04:00
Remove autoanalyze corner case.
The restructuring in commit53b8ca6881revealed an interesting corner case: if a table needs vacuuming for wraparound prevention and autovacuum is disabled for it, we might still choose to analyze it. Research seems to indicate this was an accidental addition by commit48188e1621, and further discussion indicates there is consensus that it is unnecessary and can be removed. Reviewed-by: Robert Treat <rob@xzilla.net> Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Sami Imseih <samimseih@gmail.com> Reviewed-by: Shinya Kato <shinya11.kato@gmail.com> Discussion: https://postgr.es/m/adB9nSsm_S0D9708%40nathan
This commit is contained in:
parent
e0e819cc08
commit
e3481edfd1
1 changed files with 0 additions and 9 deletions
|
|
@ -3338,15 +3338,6 @@ relation_needs_vacanalyze(Oid relid,
|
|||
scores->max = Max(scores->max, scores->anl);
|
||||
if (av_enabled && anltuples > anlthresh)
|
||||
*doanalyze = true;
|
||||
|
||||
/*
|
||||
* For historical reasons, we analyze even when autovacuum is disabled
|
||||
* for the table if at risk of wraparound. It's not clear if this is
|
||||
* intentional, but it has been this way for a very long time, so it
|
||||
* seems best to avoid changing it without further discussion.
|
||||
*/
|
||||
if (force_vacuum && AutoVacuumingActive() && anltuples > anlthresh)
|
||||
*doanalyze = true;
|
||||
}
|
||||
|
||||
if (vac_ins_base_thresh >= 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue