26.01.2026 15:14, hubert depesz lubaczewski пишет:
> On Mon, Jan 26, 2026 at 08:31:24AM +0300, Олег Самойлов wrote:
>> What is exact criteria to launch autoanalyze?
> You might want to read
> https://www.depesz.com/2020/02/18/which-tables-should-be-auto-vacuumed-or-auto-analyzed-update/
>
> Best regards,
>
> depesz
Yep, thanks. I rechecked in source. Indeed, autoanalyze depend only on
mod_since_analyze and anlthresh = (float4) anl_base_thresh +
anl_scale_factor * reltuples;
https://github.com/postgres/postgres/blob/master/src/backend/postmaster/autovacuum.c#L2901
relation_needs_vacanalyze(Oid relid,
AutoVacOpts *relopts,
Form_pg_class classForm,
PgStat_StatTabEntry *tabentry,
int effective_multixact_freeze_max_age,
/* output params below */
bool *dovacuum,
bool *doanalyze,
bool *wraparound)
And wrote such variables into
elog(DEBUG3, "%s: vac: %.0f (threshold %.0f), ins: (disabled), anl: %.0f
(threshold %.0f)"