Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK4YY-0003JP-Nw for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Aug 2021 20:03:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mK4YX-0003PS-Np for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Aug 2021 20:03:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK4YW-0003P5-TB for pgsql-hackers@lists.postgresql.org; Sat, 28 Aug 2021 20:03:57 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK4YR-0003Ez-NR for pgsql-hackers@lists.postgresql.org; Sat, 28 Aug 2021 20:03:56 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id E2F4C580B37; Sat, 28 Aug 2021 16:03:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 28 Aug 2021 16:03:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=PDoVnL4xLMZb21t071JuahU5epZgQH66+4uHQslt+UQ=; b=LB1NnZdw cG5s74Rq5C92BP+pe31y9cjiULwalKs0Bjz8Mublugz0ynycLMnGY/1JcxJxfR99 +WaZXpQubMZioIc2NzkX85W9Qx5sEKFgzJX4BtKvJN1i1D3bcxJloKkBxlJQBPT5 83qFLXgmm7XzR1VJ6xw83US+9Lm8eGcyxQX3fKCuZt3VbTwqTwe2tmcNplZ7wL6k df8K4wp7VdQexdlpkYLpKbNMv/gsb8Eiu1SnnBwRIk0061WMJkKUcHbNtwNr2nE9 lkjRd5SrKmU5MSOBU1uvNx93GHGlMxDBvOt3nT+M5o4ulRBy9yYbZr+jf01dd+K0 MRCE914EE6MyuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudduhedgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudevgeetieeiheefudevveefgeejieejtdevteekkeel gffgleegteehvdduteegnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Aug 2021 16:03:45 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 02E112A07DD; Sat, 28 Aug 2021 16:03:41 -0400 (-04) Date: Sat, 28 Aug 2021 16:03:41 -0400 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Justin Pryzby Cc: Andres Freund , Kyotaro HORIGUCHI , yuzuko , Tomas Vondra , David Steele , Kyotaro Horiguchi , Daniel Gustafsson , Amit Langote , Masahiko Sawada , Laurenz Albe , "pgsql-hackers@lists.postgresql.org" , Greg Stark Subject: Re: Autovacuum on partitioned table (autoanalyze) Message-ID: <202108282003.eg6peb4cwqp3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210817113018.GG10479@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Aug-17, Justin Pryzby wrote: > I suggest the attached (which partially reverts the revert), to allow showing > correct data for analyze_count and last_analyzed. Yeah, that makes sense and my keeping of the pg_stat_all_tables entries seems pretty useless without this change. I have pushed a slightly modified version of this to 14 and master. > Arguably these should be reported as null in v14 for partitioned tables, since > they're not "known to be zero", but rather "currently unpopulated". > > n_mod_since_analyze | 0 > n_ins_since_vacuum | 0 I don't disagree, but it's not easy to implement this at present. I think almost all counters should be nulls for partitioned tables. For some of them one could make a case that it'd be more convenient to propagate numbers up from partitions. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/