public inbox for [email protected]
help / color / mirror / Atom feedFrom: Олег Самойлов <[email protected]>
To: [email protected]
Cc: Pgsql-admin <[email protected]>
Subject: Re: autoanalyze did not run
Date: Mon, 26 Jan 2026 18:43:19 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
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)"
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: autoanalyze did not run
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox