| From: | Олег Самойлов <splarv(at)ya(dot)ru> |
|---|---|
| To: | depesz(at)depesz(dot)com |
| Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: autoanalyze did not run |
| Date: | 2026-01-26 15:43:19 |
| Message-ID: | b44fea2a-a89d-43fc-baaf-f235e24383b4@ya.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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)"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2026-01-26 16:03:21 | Re: autoanalyze did not run |
| Previous Message | nikhil Kumar | 2026-01-26 15:18:22 | EFM -switchover error |