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 1kxJSD-0005yD-W1 for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2021 00:47:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kxJSC-0002Sx-C8 for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2021 00:47:04 +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 1kxJSC-0002Sq-5I for pgsql-hackers@lists.postgresql.org; Thu, 07 Jan 2021 00:47:04 +0000 Received: from dish-sg.nttdocomo.co.jp ([202.19.227.74]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kxJS8-0004ny-0c for pgsql-hackers@lists.postgresql.org; Thu, 07 Jan 2021 00:47:02 +0000 X-dD-Source: Outbound Received: from zssg-mailmd101.ddreams.local (zssg-mailmd900.ddreams.local [10.160.172.63]) by zssg-mailou104.ddreams.local (Postfix) with ESMTP id 336F412010D; Thu, 7 Jan 2021 09:46:58 +0900 (JST) Received: from t113sg-mailcc12.ddreams.local (t113sg-mailcc12.ddreams.local [100.66.13.87]) by zssg-mailmd101.ddreams.local (dDREAMS) with ESMTP id <0QMJ010TOGUAN680@dDREAMS>; Thu, 07 Jan 2021 09:46:58 +0900 (JST) Received: from t113sg-mailcc11 (localhost [127.0.0.1]) by t113sg-mailcc12.ddreams.local (unknown) with SMTP id 1070kwZ2027110; Thu, 7 Jan 2021 09:46:58 +0900 Received: from zssg-mailmf102.ddreams.local (unknown [127.0.0.1]) by zssg-mailmf102.ddreams.local (Postfix) with ESMTP id 1CE247E603C; Thu, 7 Jan 2021 09:46:42 +0900 (JST) Received: from zssg-mailmf102.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1BA4C8E605C; Thu, 7 Jan 2021 09:46:42 +0900 (JST) Received: from localhost (unknown [127.0.0.1]) by IMSVA (Postfix) with SMTP id 19CAA8E605A; Thu, 7 Jan 2021 09:46:42 +0900 (JST) X-IMSS-HAND-OFF-DIRECTIVE: localhost:10026 Received: from zssg-mailmf102.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0D578E6056; Thu, 7 Jan 2021 09:46:41 +0900 (JST) Received: from zssg-mailua104.ddreams.local (unknown [10.160.172.62]) by zssg-mailmf102.ddreams.local (Postfix) with ESMTP; Thu, 7 Jan 2021 09:46:41 +0900 (JST) Received: from [10.132.149.231] (unknown [10.160.179.1]) by zssg-mailua104.ddreams.local (dDREAMS) with ESMTPA id <0QMJ010ZVGTP79A0@dDREAMS>; Thu, 07 Jan 2021 09:46:37 +0900 (JST) Subject: Re: list of extended statistics on psql References: <20200831153053.a343pjgumahiejhw@development> <20200831161809.GA31337@alvherre.pgsql> <20200831163200.jp6eqbaaupb6hxac@development> <20200917055531.GV2873@paquier.xyz> <20200930061947.GD1996@paquier.xyz> <2a3173fb-8571-3779-2916-d16a170750f0@nttcom.co.jp_1> <20201028190601.bbshe6dhp32767q7@development> <027134cc-4c99-2878-4385-c0786283c5ea@nttcom.co.jp_1> <831cda41-2299-51f7-12c3-9bf9d3328a58@nttcom.co.jp_1> <9ed1643b-5c04-640b-70fa-ad7984972cd0@enterprisedb.com> <3f695394-9c0a-51d3-9bd7-c25ad2217cca@nttcom.co.jp_1> <1123e0bb-a95e-dd4f-eff5-97a668b48077@enterprisedb.com> <9ce1985e-2cdc-f56f-fc6b-44d4ef0bcf0d@nttcom.co.jp_1> <6505b34d-a6a3-c9e0-9113-ff8dc0127465@nttcom.co.jp_1> <98fc5f3c-3726-a5fd-376f-b29746954b7b@nttcom.co.jp_1> <2fe425ac-dc47-f304-c8d7-9fea763482d7@enterprisedb.com> From: Tatsuro Yamada Message-id: <026b125d-de2c-e5b4-9ac9-99889b73de30@nttcom.co.jp_1> Date: Thu, 07 Jan 2021 09:46:37 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-version: 1.0 In-reply-to: <2fe425ac-dc47-f304-c8d7-9fea763482d7@enterprisedb.com> Content-type: text/plain; charset=utf-8; format=flowed Content-language: en-US Content-transfer-encoding: 7bit X-TM-AS-GCONF: 00 To: Tomas Vondra , Tomas Vondra Cc: Michael Paquier , Pavel Stehule , Alvaro Herrera , Julien Rouhaud , PostgreSQL Hackers X-CC-Mail-RelayStamp: CC/Mail Relayed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Tomas, > Thanks, and Happy new year to you too. > > I almost pushed this, but I have one more question. listExtendedStats first checks the server version, and errors out for pre-10 servers. Shouldn't the logic building query check the server version too, to decide whether to check the MCV stats? Otherwise it won't work on 10 and 11, which does not support the "mcv" stats. >> I don't recall what exactly is our policy regarding new psql with older server versions, but it seems strange to check for 10.0 and then fail anyway for "supported" versions. Thanks for your comments. I overlooked the check for MCV in the logic building query because I created the patch as a new feature on PG14. I'm not sure whether we should do back patch or not. However, I'll add the check on the next patch because it is useful if you decide to do the back patch on PG10, 11, 12, and 13. I wonder the column names added by \dX+ is fine? For example, "Ndistinct_size" and "Dependencies_size". It looks like long names, but acceptable? Regards, Tatsuro Yamada