Re: autoanalyze did not run
От
Олег Самойлов
Тема
Re: autoanalyze did not run
Дата
Msg-id
b44fea2a-a89d-43fc-baaf-f235e24383b4@ya.ru
Ответ на
Re: autoanalyze did not run (hubert depesz lubaczewski)
Список
Дерево обсуждения
autoanalyze did not run Олег Самойлов <splarv@ya.ru>
Re: autoanalyze did not run hubert depesz lubaczewski <depesz@depesz.com>
Re: autoanalyze did not run Олег Самойлов <splarv@ya.ru>
Re: autoanalyze did not run Laurenz Albe <laurenz.albe@cybertec.at>
Re: autoanalyze did not run Олег Самойлов <splarv@ya.ru>
Re: autoanalyze did not run Laurenz Albe <laurenz.albe@cybertec.at>
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)"
В списке pgsql-admin по дате отправления