Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkOkY-00ETEF-2w for pgsql-admin@arkaria.postgresql.org; Mon, 26 Jan 2026 15:43:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkOkY-008hnG-0G for pgsql-admin@arkaria.postgresql.org; Mon, 26 Jan 2026 15:43:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkOkX-008hn7-2O for pgsql-admin@lists.postgresql.org; Mon, 26 Jan 2026 15:43:34 +0000 Received: from forward502a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:d502]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkOkU-002Pls-0t for pgsql-admin@lists.postgresql.org; Mon, 26 Jan 2026 15:43:33 +0000 Received: from mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:340d:0:640:ad51:0]) by forward502a.mail.yandex.net (Yandex) with ESMTPS id 1563680ADB; Mon, 26 Jan 2026 18:43:26 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id KhiB5P0GtW20-kOPBXCVn; Mon, 26 Jan 2026 18:43:21 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1769442201; bh=ulJoEz+rgWDHjqnrEVXaVRJhKYwaaSLknRENht99Zcc=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=FVF/MGT7VTSJR+P0zGmQ+kdNfEOp9JVCOkLEp5Szce25YMGteKs4fvJiIg8hqz6Hz sZkLU4ZMhfUMA+FQh/Eenmyx/zl0yrQ6btFEy1yqYH2i76FjrvV4zF4DoEMMsEp/y3 LiLHVaF6qvd3rjWQVJge4HbIB8S5/bqjfCptB3n0= Authentication-Results: mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net; dkim=pass header.i=@ya.ru Message-ID: Date: Mon, 26 Jan 2026 18:43:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: autoanalyze did not run To: depesz@depesz.com Cc: Pgsql-admin References: <0dce35ca-24fa-4234-99fe-071bd5725a32@ya.ru> Content-Language: ru, en-US From: =?UTF-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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)"