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 1l0v3N-0005nL-35 for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Jan 2021 23:32:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0v3M-0007LG-03 for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Jan 2021 23:32:20 +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 1l0v3L-0007L9-Le for pgsql-hackers@lists.postgresql.org; Sat, 16 Jan 2021 23:32:19 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l0v3I-0006jM-IT for pgsql-hackers@lists.postgresql.org; Sat, 16 Jan 2021 23:32:18 +0000 Received: by mail-ej1-x630.google.com with SMTP id n26so18555856eju.6 for ; Sat, 16 Jan 2021 15:32:16 -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=JhYEWpem3+7YR/vxmeoThVeePpLXKmWnkvUV8RHMPHI=; b=zrKeCOqMayAQxteZTO5/Mgz/yKsX6MyIyg9T8gnKovil9mHqB+tB0BwW88yBsKFovl kxwhE6V02CTBNk2q/vxGvWzapQoI14cwGu/5Qj5hitvsBkgNM7ESFr7hljBE5IgRRht2 yZ/iB744ytA0RM3iyOhySAIk7Xb1rO+Ybxuf4ZWQN87q+3dAc5s5jntHWyxATUXPm2bd lR0lxp2ujdKMRoOuIo3iaRhswyD7Yq4p68NIjZWOK5oWWX6fqvatiYYmTixB+Lya2lHs OCi9yyVuGDwCp+C1HCdPSuFR3xwHojFdTZNCKsyfvjc6fW4IjTFeHBQRT9PDwq/HcStu m0gQ== 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=JhYEWpem3+7YR/vxmeoThVeePpLXKmWnkvUV8RHMPHI=; b=FKSCu//T9HvpVtPFm0HUjnC+99E2h22l4vvr2utmng6bq4lT/LKXGR89TmXLakqWkU V1QV6HcpV0IPwk3jWIPh7y5DBTbDu4cyNstOFczol18xo1sQ7YOmVKoLdPCzB1gceCwp f5TUk86+DgajYhOtpXAhQZsw/Vh81uBGfWvQeyP4ugVAbXxFoPJWMAeYilvAcsDoX3UF 64CNNORQTEijiLTGhmwnrhnlHKnT4Z2wWvqDS3AIaab0JRj/UwiiORwe3aBJKnx4Z9e7 NeTY5CNH7eiki48n5eP49neEmCksaf1ICDJT2kyqSKl89jhvTez+q7H7h1Zo5QaYzxGB IYPA== X-Gm-Message-State: AOAM532RSwiBplAGT195r3Cc/RkgQgmCVzZXcf27yH5u4LuAgMNQRTM/ yjsDPiI4fD3NhBHApmHuZ/xHbfA8s/XzDR79aTfKf5kJcBn+3grbydkBM95wGuga0V236NBpy63 mZcPIFDKu4isasX4d/w8kYyceqdboEkyh2Vz6Dj7UHLe7oeDWFuIqVoLG/Jmsln/9oEqvMUGiJ0 EDWDEgzdaXgDWrIcG3Jgx05SmNeyOrpHcPeXS1aGKxna6g1Ep/rnCGSpTnqUtnl9JpsA/ZZifPI qEqAO7GKx+McycOQl0fYXrGp8lE+ycSVS/ZT/JpfrIR4dLf46l2fg== X-Google-Smtp-Source: ABdhPJwb9EV/qo8UWLamED6t7mXnA7A2pgW0ymbh5q3wjVQpyPPOPKhIQeXGann7RIahorHo/l5GaA== X-Received: by 2002:a17:906:fcce:: with SMTP id qx14mr2210167ejb.220.1610839933521; Sat, 16 Jan 2021 15:32:13 -0800 (PST) Received: from [10.137.0.20] (ip-86-49-253-127.net.upcbroadband.cz. [86.49.253.127]) by smtp.gmail.com with ESMTPSA id zg7sm4336476ejb.31.2021.01.16.15.32.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Jan 2021 15:32:12 -0800 (PST) Subject: Re: list of extended statistics on psql To: Julien Rouhaud , Tatsuro Yamada Cc: Alvaro Herrera , Tomas Vondra , Michael Paquier , Pavel Stehule , PostgreSQL Hackers References: <20210107144713.GA8872@alvherre.pgsql> <61cba5af-5a58-6bda-610c-420077b780c3@enterprisedb.com> <1045d2cb-7ecd-e6bf-cb50-8eeea89cc4b0@nttcom.co.jp_1> <9e76ce7a-e7ab-5f08-9938-59fffc20d106@enterprisedb.com> <29e16ceb-8777-4297-19c8-245242dd7473@enterprisedb.com> <876efa7e-2067-a4f9-d7e8-f6025440c870@nttcom.co.jp_1> <0e84aa72-25f2-1849-753f-f827949132b3@enterprisedb.com> <85e7e1e7-c2f0-a4a0-61de-6e7ecaee44e3@nttcom.co.jp_1> <79d3a4c5-1efe-5b9e-c06e-3a907b531013@nttcom.co.jp_1> <20210115084741.GA91293@nol> <2eb51458-7475-17d3-cb13-b3c950b2f930@enterprisedb.com> From: Tomas Vondra Message-ID: <5e0fb573-3c38-ee39-885c-bdc01f116335@enterprisedb.com> Date: Sun, 17 Jan 2021 00:32:10 +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: <2eb51458-7475-17d3-cb13-b3c950b2f930@enterprisedb.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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/15/21 5:19 PM, Tomas Vondra wrote: > > > On 1/15/21 9:47 AM, Julien Rouhaud wrote: >> On Wed, Jan 13, 2021 at 10:22:05AM +0900, Tatsuro Yamada wrote: >>> Hi Tomas, >>> >>> On 2021/01/13 7:48, Tatsuro Yamada wrote: >>>> On 2021/01/12 20:08, Tomas Vondra wrote: >>>>> On 1/12/21 2:57 AM, Tatsuro Yamada wrote: >>>>>> On 2021/01/09 9:01, Tomas Vondra wrote: >>>>> ...> >>>>>>> While working on that, I realized that 'defined' might be a bit >>>>>>> ambiguous, I initially thought it means 'NOT NULL' (which it does not). >>>>>>> I propose to change it to 'requested' instead. Tatsuro, do you agree, or >>>>>>> do you think 'defined' is better? >>>>>> >>>>>> Regarding the status of extended stats, I think the followings: >>>>>> >>>>>>   - "defined": it shows the extended stats defined only. We can't know >>>>>>                whether it needs to analyze or not. I agree this name was >>>>>>                 ambiguous. Therefore we should replace it with a more suitable >>>>>>                name. >>>>>>   - "requested": it shows the extended stats needs something. Of course, >>>>>>                we know it needs to ANALYZE because we can create the patch. >>>>>>                However, I feel there is a little ambiguity for DBA. >>>>>>                To solve this, it would be better to write an explanation of >>>>>>                the status in the document. For example, >>>>>> >>>>>> ====== >>>>>> The column of the kind of extended stats (e. g. Ndistinct) shows some statuses. >>>>>> "requested" means that it needs to gather data by ANALYZE. "built" means ANALYZE >>>>>>   was finished, and the planner can use it. NULL means that it doesn't exists. >>>>>> ====== >>>>>> >>>>>> What do you think? :-D >>>>>> >>>>> >>>>> Yes, that seems reasonable to me. Will you provide an updated patch? >>>> >>>> >>>> Sounds good. I'll send the updated patch today. >>> >>> >>> >>> I updated the patch to add the explanation of the extended stats' statuses. >>> Please feel free to modify the patch to improve it more clearly. >>> >>> The attached files are: >>> 0001: Add psql \dx and the fixed document >>> 0002: Regression test for psql \dX >>> app-psql.html: Created by "make html" command (You can check the >>> explanation of the statuses easily, probably) >> >> Hello Yamada-san, >> >> I reviewed the patch and don't have specific complaints, it all looks good! >> >> I'm however thinking about the "requested" status. I'm wondering if it could >> lead to people think that an ANALYZE is scheduled and will happen soon. >> Maybe "defined" or "declared" might be less misleading, or even "waiting for >> analyze"? >> > > Well, the "defined" option is not great either, because it can be > interpreted as "NOT NULL" - that's why I proposed "requested". Not sure > about "declared" - I wouldn't use it in this context, but I'm not a > native speaker so maybe it's OK. > I've pushed this, keeping the "requested". If we decide that some other term is a better choice, we can tweak that later of course. Thanks Tatsuro-san for the patience! regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company