Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEbT3-0001by-As for pgsql-general@arkaria.postgresql.org; Fri, 04 May 2018 14:13:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fEbT0-0001iG-Ux for pgsql-general@arkaria.postgresql.org; Fri, 04 May 2018 14:13:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEbSz-0001i5-60 for pgsql-general@lists.postgresql.org; Fri, 04 May 2018 14:13:46 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEbSv-000258-2i for pgsql-general@postgresql.org; Fri, 04 May 2018 14:13:43 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AC54521124; Fri, 4 May 2018 10:13:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 04 May 2018 10:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=Q2doEpVgwHAoX7+unc3wwTU115XZylRASFWqJaKx74Q=; b=VQ4T3avg Xyt8xDDzHsRPtiUfTdCOH2jmyyO0AnSNZaP6tzhVZwsfweyhZ/OUgy6CklbVehXB 38B+qLd1ZjyRGolNjowAL2rxvgGbI2dAlE1RqoEYf7EcC/Vt6Q4pWIbPSH3hXx9K Vq0EdWvjJz/Z5elVYs+aO8X0MGgydbgORFj/5QtrJ0DgtGPd2y28r6xjd/oPNPT8 E/07VcB1RvBzZF8exW3NY7D6OooadIyrWtTqhw1w+3egNcjRCaiwma/0UKS9Hp5n H0ruHbwUCcHTpSlvE0VRvflIgEVfz2mAE6Vz7D1XEqVJ469/nzp04aD+UUAxfFZP yFqtukavJ0mtKg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=Q2doEpVgwHAoX7+unc3wwTU115XZy lRASFWqJaKx74Q=; b=WBBDRlI8M5RtU8r9Fq28WELMRAgXkcdC7vFCYoR2OH3oU f9OBdDLucNpip4Smp4Ph3O176MAlNkNTlj0DRl84gHrqVMdCWA+PrQBCp3oyt3xB tbR1PGCEziaUJSBqpp1XCNhXJQajAFIuXztY+vOH1C72jxH9XfoHFDkcCeovHbN4 EsxD/o2j8L20cVpDkX3tJ2W7C3cp4gigtM1TBlxGLv6xSzWo9EkxqjhCucmdraub AAOvSghzn7UJFazukru+VOV6jexD6tHzIWjbRgvT36aL/lfVM2L8buhWBK9Zc4m9 wq67rY9yOejSY/KmJIWb2w1Cybbq+nXLJNH9g3A4A== X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 9552EE44F3; Fri, 4 May 2018 10:13:36 -0400 (EDT) Date: Fri, 4 May 2018 23:13:33 +0900 From: Michael Paquier To: Justin Pryzby Cc: Adrian Klaver , Alvaro Herrera , pgsql-general@postgresql.org Subject: Re: relkind='p' has no pg_stat_user_tables Message-ID: <20180504141333.GF1592@paquier.xyz> References: <20180503162047.37k7km4dx62i6l4d@alvherre.pgsql> <0d1a3f8a-f6f9-4712-6b6c-174e64a38b48@aklaver.com> <20180503173855.GH9585@telsasoft.com> <20180503182459.GI9585@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oPmsXEqKQNHCSXW7" Content-Disposition: inline In-Reply-To: <20180503182459.GI9585@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --oPmsXEqKQNHCSXW7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 03, 2018 at 01:24:59PM -0500, Justin Pryzby wrote: > Yes, I was surprised about the difference between ANALYZE relkind_p > and relkind_r. >=20 > But I see that's a documented behavior I'd missed until now: >=20 > https://www.postgresql.org/docs/current/static/sql-analyze.html > |If the specified table is a partitioned table, both the inheritance stat= istics > |of the partitioned table as a whole and statistics of the individual par= titions > |are updated. When I read this thread, it seems to me that more user-friendly system functions able to extract a sub-tree of child relations (by inheritance and/or partition) is something which would help. Now users are limited to things like large WITH RECURSIVE queries when willing to extract a full tree. While that's easily done with a custom function, there is room for an in-core function as well. I recall that Amit Langote has sent a patch which introduces a wrapper function on top of find_all_inheritors, perhaps that would get into v12. -- Michael --oPmsXEqKQNHCSXW7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlrsao0ACgkQnvQgOdby QH1GUhAApUPd+DIvXF1QLM0dp7S8qEFfqD8XAsKRWhSk7nb2zrCF0mFTVyFJTT01 sKwqpCjGqjuhzaQ26yTmreM+UNZAGJK5+dRqxfttfl1H2nKR3cUCo2NN1NadOLTs 8mQf09vCoMVAiqutn1AzabJ3/NbjaEuX6H9IOk3DDvxTk5dEjvKTxXxkyvbdiubr gc3rgyyujDJoeZSrHCn65IDNUBdfaY0gez4yMyPFPwuo1ZRMcoyEsBqTnDNuZ+1R 2Bav9MwLcdLp+KLmeU0jS2v+92J+pr4zCLAE2WJS4AWRbMjdOTIQOJYoYgZK75ZN ZSYwM2gNWWA4eCrwfq+WMLYQgL1mKrsNr6SEacNURpFh0cGyr5FvYqVhRhNMstkl M+XSNhbcd2o0g+UqyZk+U8sS43JTPIQYWzfx2RmSjORkCnJIJORcxeHErZ202qnZ s8Z6n1vzT2Ov5oL6jiJksGNxdkbaof1d5CKxCcK61jFW+MpP+s/oNd8MJ0EitqvD 0CFHJG2EFxuKQvS1fPkBultwAuu6N3tOgEtOr9BrTQQ1zL56iUY+sRb23BszDVov 0R9n0f3JzGE+ah6HVqZyqD8sHvUwyHhAQm+TCAYeUz2UfNi94U/7LjXptUo0jfj8 KD6ftt0fG+SfMfwkC30bn9bmfpZpNwGQ9ltqmqh7QxmfGemxQCo= =Uk5N -----END PGP SIGNATURE----- --oPmsXEqKQNHCSXW7--