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 1l0Kly-0005JP-Gp for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jan 2021 08:47:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0Klx-0002tb-Ce for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jan 2021 08:47:57 +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 1l0Klx-0002tT-3v for pgsql-hackers@lists.postgresql.org; Fri, 15 Jan 2021 08:47:57 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l0Klq-0005kD-Ia for pgsql-hackers@lists.postgresql.org; Fri, 15 Jan 2021 08:47:55 +0000 Received: by mail-pj1-x1029.google.com with SMTP id p15so4586764pjv.3 for ; Fri, 15 Jan 2021 00:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=I7aY/+3Wz74JKj0qP2M/e7xhEFUfKPaJY9qINlSg+Ek=; b=nxOq066D686b5tacSBWVFch/odVzlH5/4hvO3PkGvoGiQk2/RjFSHKyB844MpfDU0c IdWnnOviu1ajwtoQIqlcXCHaGQ0rhfYYYZjrREo1SNAeSCffjIpE4ZKtCJWHJt0BTD67 e61yIdXDaN2oCyrpTa+mN+uLDB4py57HILd5xHnBB56J6N0dMijFBtztCmN4GFt0GvFh MIyAOVWLy+LzQb5oWPtSk1qhCIvX4q4NVVsVPdRHuN8Iyl8wTN7PAv4vD/Q4/4XIPGsP evqN6Umi05a3KySexHQek5ul7LzFvHXTj+fNtnjDOzTgFdSCIMZhK/z6fwhoJzHNVOIO HU2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=I7aY/+3Wz74JKj0qP2M/e7xhEFUfKPaJY9qINlSg+Ek=; b=BNZ/tJyc2yL5dYABRVWxXrbSMZGKReDWlogJGF9AnDPW7qkJTZ2Q5/Pkgle+seJbwt IAfTzgPX6neRCeT+LfFXm7ZeriWL8igDd5FbE31DwO8Iykz2UZGRHxS3OQ0eiETo0Vwz c0NdEh1OZLmUCJ9wnABqgIKKd5YO4QzuwkTuO6/kAzLN6PHudROnWjeI7lS5NppCCt8n ob+HXCTL1/GP74Vo9qRnplW2MgTJo01/pnXFgMRteqiDAjhSgDLtMAAnluwu0xSAq4vW yQI/Zz0/Lvs5vVzAqjZUPb/4iKdNVnJoyE5Q5UmoEQ8rpoFFnyA/lQu7sKm4Lk1y0Wo1 QvFw== X-Gm-Message-State: AOAM533hbpnp6E4ubJ0vDNmESDivEh0F+04WHs4iJ1jtzKghaYvnztev lpjaU/cFRx5BmC5L8K955V0= X-Google-Smtp-Source: ABdhPJwwObJayp3+YRKDNIxMDC4s8GOpG01kppESIVKvzJIHxISE64NbSVB3zJIMy1+kyOHw2l8cpA== X-Received: by 2002:a17:902:ce81:b029:de:6b3c:fcd2 with SMTP id f1-20020a170902ce81b02900de6b3cfcd2mr3707167plg.67.1610700469581; Fri, 15 Jan 2021 00:47:49 -0800 (PST) Received: from nol (36-228-109-158.dynamic-ip.hinet.net. [36.228.109.158]) by smtp.gmail.com with ESMTPSA id 8sm7862371pgx.48.2021.01.15.00.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 00:47:48 -0800 (PST) Date: Fri, 15 Jan 2021 16:47:41 +0800 From: Julien Rouhaud To: Tatsuro Yamada Cc: Tomas Vondra , Alvaro Herrera , Tomas Vondra , Michael Paquier , Pavel Stehule , PostgreSQL Hackers Subject: Re: list of extended statistics on psql Message-ID: <20210115084741.GA91293@nol> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <79d3a4c5-1efe-5b9e-c06e-3a907b531013@nttcom.co.jp_1> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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"?