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 1kxJbO-0006Ar-Vf for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2021 00:56:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kxJbL-0005dA-NF for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2021 00:56:31 +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 1kxJbL-0005d2-Cb for pgsql-hackers@lists.postgresql.org; Thu, 07 Jan 2021 00:56:31 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kxJbD-00011q-Bd for pgsql-hackers@lists.postgresql.org; Thu, 07 Jan 2021 00:56:30 +0000 Received: by mail-ej1-x630.google.com with SMTP id 6so7535408ejz.5 for ; Wed, 06 Jan 2021 16:56:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yqpMBFxun88YXjQOEzkamnP0XR+sJsRSzDLpuuhvegc=; b=Ee4DJ/NsJffU/3+lvprOsebHRYXjv9TMsOHUBjevMEaWZkBoguvHCR2l03Kkb//znK t35fGtJ8E3SloJgpTflN7j0qPYRXSOqcXgMbwqeW34Wm9YPvJcmaSBjuLoqaKKXIf38d QNIieW4qpzxTPRmLjMDT3t0T03d4QJAFZVigm7xgK+72rv8NBIx35ebstN8pdBDYi3qO jS5t3heclJ0uHf40fNd0Wosv2b5nDgg2FYvJpBvr2IlNmdWjiYFZWb8rRGYviVpi20NS ZROUcsAoGyBthT6cJALBlcDlbvY5//V4rGeBkA/ye2LPN2dbnsuCGYOvRteuLf8Vt4Ct QOhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yqpMBFxun88YXjQOEzkamnP0XR+sJsRSzDLpuuhvegc=; b=b2Pk6chmQc1My2fwqgqU2bk2MGKgQqW5Sb72LKL6yIa8BwjCUrBWYMviDaVJggqSx+ OKqAg9g8Eq0Fp9QRB8y9imt8SD1r9FTkrL5LqVouUj/02CDLZK38JQgj/76Z+tx6O2M2 fAmm4GBev/qXuTNUHzLL8vbaf4yxry/C//xBJxxLysfCY7CMYPy2frFaZ7jmzO3BLLkl 0HQLgDyJvTMcMup7pQzTRBpi/IkxAJIWY7Eqp0acB5Wmlk0ZyWX2XK+cQ42obJLxxBBe cRuFAu2QrAMYrjpMcs/aFlXnaII+ydu5QIdComC5U9iADZRhh7E5gY/IFfICLLH7EQ7T khVQ== X-Gm-Message-State: AOAM531ZFX9oO48pJsHHNEG69GrKX1vBE9BmFHPjGrKceRn55D7Cnw2d 2D5KhGz6L9Kp9Sp1Mn7f311XdAfAEoZM2hI8jt9rLfnnHzeg8HYpfj9t9SGboxl4ZMWaw4GvPTq f4ddSkLcz+EVUh0DnCJ8L/jU1avZyMiXliyUK1fUtgewcwhwlgHg7S31kC9Mv2ue4dl2GVW1Zvm 2m5q7p+qQ5PtluRits7b4jH5BhaRlrEXKDwqST87ut6a4K6BACTOqs6YYJwYg03NS65OGY6fTYT VobPlAF6zxuPKYgJc5wQFSGiHKvQ2VqrkAUqt2fQ2P1lQoX42ULDNVr X-Google-Smtp-Source: ABdhPJxZzPif8t4fiHkHRNgUj0t8iXeXD2+Oy9EE6yWNiXcv/o7ThxLeLlm0hrfoHgeF/qJrocmpVQ== X-Received: by 2002:a17:906:259a:: with SMTP id m26mr4651937ejb.399.1609980981181; Wed, 06 Jan 2021 16:56:21 -0800 (PST) Received: from [10.137.0.20] (ip-86-49-249-71.net.upcbroadband.cz. [86.49.249.71]) by smtp.gmail.com with ESMTPSA id u2sm1860249ejb.65.2021.01.06.16.56.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jan 2021 16:56:20 -0800 (PST) Subject: Re: list of extended statistics on psql To: Tatsuro Yamada , Tomas Vondra Cc: Michael Paquier , Pavel Stehule , Alvaro Herrera , Julien Rouhaud , PostgreSQL Hackers References: <20200831153053.a343pjgumahiejhw@development> <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> <026b125d-de2c-e5b4-9ac9-99889b73de30@nttcom.co.jp_1> From: Tomas Vondra Message-ID: Date: Thu, 7 Jan 2021 01:56:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <026b125d-de2c-e5b4-9ac9-99889b73de30@nttcom.co.jp_1> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/7/21 1:46 AM, Tatsuro Yamada wrote: > 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. > +1 BTW perhaps a quick look at the other \d commands would show if there are precedents. I didn't have time for that. > I wonder the column names added by \dX+ is fine? For example, > "Ndistinct_size" and "Dependencies_size". It looks like long names, > but acceptable? > Seems acceptable - I don't have a better idea. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company