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 1lUzR9-0007El-1q for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 22:17:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUzR6-0001N3-Gi for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 22:17:08 +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 1lUzR5-0001Je-K4 for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 22:17:08 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUzR2-0005GS-TQ for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 22:17:07 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 89FE05C008E; Fri, 9 Apr 2021 18:17:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 09 Apr 2021 18:17:02 -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= fm2; bh=NCFebtXDme2nCdpsykg7KMrqpeQo+It3Y0lp8Ln9Qbc=; b=P+Y5wTFb gRzoJam6vLqX6iyrldBcwHXZ9jHkcrZyVs7fATYIAPKijYslGMksMG6Ps/Y2at4b uVFXZhT/1VZNNWXBM3v9hU0UyeMIC6gh2G4+EpgpJ3HzYjSQry32j5cGcdimBVkl kBauHuhg/oymtb3EE92GeErlQ7SHuaRln9qzai16lR+73OZQ2ufSS35Fz7b714zO 83mEX6ye1h+DnMaEJxetnMmBPpNya7zt/t0lPgk/b2ErHMEENt0m9jsFRWJoO2KZ zrU3DnlErCt8zRnd8tozjsHHvgV42tASkYsNmvQIhtQr/0/PNsaLxf6suQCyyng0 MkncFdx1bV4U/w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekvddgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjfgesthekredttderudenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepueffhfejieeuueffgedvudekgeeltdeviedvieeufeei ieevgfetheeufeethedvnecukfhppeduledtrdelhedrudelrdelheenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id E2A3124005E; Fri, 9 Apr 2021 18:17:01 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1FF142A0EDC; Fri, 9 Apr 2021 18:16:59 -0400 (-04) Date: Fri, 9 Apr 2021 18:16:59 -0400 From: Alvaro Herrera To: Justin Pryzby Cc: Robert Haas , Tom Lane , Zhihong Yu , pgsql-hackers@lists.postgresql.org, Yuzuko Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables Message-ID: <20210409221659.GA28298@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210409214508.GV6592@telsasoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Apr-09, Justin Pryzby wrote: > One data point: we do DETACH/ATTACH tables during normal operation, before > type-promoting ALTERs, to avoid worst-case disk use, and to avoid locking the > table for a long time. It'd be undesirable (but maybe of no great consequence) > to trigger an ALTER when we DETACH them, since we'll re-ATTACH it shortly > afterwards. You mean to trigger an ANALYZE, not to trigger an ALTER, right? I think I agree with Tomas: we should do it by default, and offer some way to turn that off. I suppose a new reloptions, solely for partitioned tables, would be the way to do it. > However, I think DROP should be handled ? DROP of a partition? ... I would think it should do the same as DETACH, right? Inform that however many rows the partition had, are now changed in ancestors. -- Álvaro Herrera 39°49'30"S 73°17'W "Aprender sin pensar es inútil; pensar sin aprender, peligroso" (Confucio)