From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Julien Rouhaud <rjuju123@gmail.com>
To: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: list of extended statistics on psql
Date: Sun, 17 Jan 2021 00:32:10 +0100
Message-ID: <5e0fb573-3c38-ee39-885c-bdc01f116335@enterprisedb.com> (raw)
In-Reply-To: <2eb51458-7475-17d3-cb13-b3c950b2f930@enterprisedb.com>
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>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@enterprisedb.com, rjuju123@gmail.com, tatsuro.yamada.tf@nttcom.co.jp, alvherre@2ndquadrant.com, tomas.vondra@2ndquadrant.com, michael@paquier.xyz, pavel.stehule@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: list of extended statistics on psql
In-Reply-To: <5e0fb573-3c38-ee39-885c-bdc01f116335@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox