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 1q3VLs-00074m-KG for pgsql-bugs@arkaria.postgresql.org; Mon, 29 May 2023 05:23:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q3VLq-00037f-30 for pgsql-bugs@arkaria.postgresql.org; Mon, 29 May 2023 05:23:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q3VLo-00037U-Fi for pgsql-bugs@lists.postgresql.org; Mon, 29 May 2023 05:23:25 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q3VLh-002SRZ-2I for pgsql-bugs@lists.postgresql.org; Mon, 29 May 2023 05:23:23 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 428E132007F1; Mon, 29 May 2023 01:23:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 29 May 2023 01:23:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1685337790; x=1685424190; bh=G3 +FD+uWfvTxvvAM3IRPPQOf+Z8Vbt/WFeSggj0DPxI=; b=HkWntDbc6Jd8dRH+Tj xcc23eh3lpGkZ0O4Z+cUKo/icbj1iTTu5cpCp+k9rXvKinbB/p+IW19BC7XBYKB4 XXPeqjZ4Wq0JH70If9QABikW27szr7AOwm1B5VStHhIq+zOzRkMjFWT/MohjxPZq CUyj7sI3KETOY19sFb4bgEVWZfXJ6iprS9V6hjinz7HaNTPRRUQf97ng+7ll3aAg v/MYwTxWHcll+iZEtWr2vm4u4vplSfA5DSZpw9clnzbvz2fNFwjb37G/VDbAAvuS PfV1utEU6TgaHbb9urbKAR+xU05WpqWlDjI0aBdEMCMJqixQRDL+eBX0qCQLWMVt u67g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685337790; x=1685424190; bh=G3+FD+uWfvTxv vAM3IRPPQOf+Z8Vbt/WFeSggj0DPxI=; b=TUcBl4CZZqfTRefff88lks0J6n80I tq4p7DNxeDH6FUzx2PTQmM4AEsuhQauNHP9ucaE1P2EJGy8QWBFMpfDornwUMzR1 X3Bn+xK8E/BnjfOkordkBgJDYxlJbt+huhnGrd8R848pQCT9cXMihmKns6siI8A5 0K9PQjmI27CqJ3MRvevDldBQ2ASZQNo+vbxUZhL9GYiKH/hUNDhbMRPLH6LVlWSe ijpGQQPg4ABfUOzQF+pKFzbMMkUFeL4iMQNZeDOro4HjyFBop2W6DCpp3msOAj/y LGQlOe8JK5S9uF9ISCw0zlIbNOxfunFUZsf5M6GwU1M+L/pHd1Eqb1E1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeekgedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 May 2023 01:23:09 -0400 (EDT) Date: Mon, 29 May 2023 14:23:05 +0900 From: Michael Paquier To: Kyotaro Horiguchi Cc: henri.chapelle@dbandmore.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables Message-ID: References: <20230526.091536.1662896499070434031.horikyota.ntt@gmail.com> <20230526.164935.906413482200781902.horikyota.ntt@gmail.com> <20230526.180207.2066564295031330076.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hV0oVR4Nyj6sWvbT" Content-Disposition: inline In-Reply-To: <20230526.180207.2066564295031330076.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hV0oVR4Nyj6sWvbT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 26, 2023 at 06:02:07PM +0900, Kyotaro Horiguchi wrote: > For 12 or later, pg_partition_ancestors() is available. Thus something > like the following query would work. Yes, we will need to be a bit more imaginative for older servers :( Any pre-11 logic added had better mention the compatibility tweak it required, and that pg_partition_ancestors() could be used to simplify the filtering a lot for the analyze case. It would be good to add some test cases to check all the patterns we would need to look after, for both the VACUUM and ANALYZE cases. Perhaps with vacuumdb --verbose and a pattern match check of the logs produced, with at least 2 level of partitioning to check after the case of ANALYZE run across a rather complex partitioning tree? -- Michael --hV0oVR4Nyj6sWvbT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmR0NrkACgkQnvQgOdby QH25SQ//UHZqLrfGq2WJXPWo3Xt4jBvA40UCBejeMliWeYJ6/MLC5ddKVur84xMf LramYtxcvCFOL3uumXXV6TfIDct2LSw59OYUuJSRSrd0/rjs6pOKSSOWOZljUEbl vR3pXmAGZ1539g7vY4DzP8BQxcTryQ8rjcocR+c/V5Qy58ygC1sHbV2hNiHpHnpy FudQ/1kdFRhGpHS7e9/cxk+wEREgQmzvjvToTdsTKcmXjRVTelORJrkak1eDZXxy +pdeZxi5vcefsFtZ4IUjDMjfpJ2VxFjNwjlBp5/lfnNNL7EbnwW6LHny+VwYkPUC parfvtQd1EWzmGDZ7vyEkyv8/chmwOGfcU26PQqoGEJDsPEpYRZv/S4klKoOJBs9 uvU0WvUJ83ZvlzciJg0Il552o02ZpgsTBJwAJi2EHZ1+BomiGxJPkz0fLCQySYE+ 6uHj/3Pj7JZ6evG9inzs2pS3yYxBl0vLmtzEqlqlbWWcvGXZW3hGE4JzQmgfI9ag hIeZBhj96xZKK0htKA6H6Kp8P1ckw08cZSbea/nXK/qkE7G2L/JBYHjeiJR31pl/ pNfpRPaATl20cimBMFMbPtqAXhvakAxVxZ+193EcdQf7eSS0bnhyxdrm/MWF4abO 6tBSDL31JxAZd0lPrkJEumK4Xiyv4Ht1JeBQFIyetYN3tnEuAHc= =T805 -----END PGP SIGNATURE----- --hV0oVR4Nyj6sWvbT--