From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: list of extended statistics on psql
Date: Sat, 29 Aug 2020 23:54:58 +0200
Message-ID: <20200829215458.ca6pnchavgfhs2pf@development> (raw)
In-Reply-To: <20200828032617.GA22893@alvherre.pgsql>
References: <6fc07377-c8c5-c762-2e2c-77059d8147af@nttcom.co.jp_1>
<20200828032617.GA22893@alvherre.pgsql>
On Thu, Aug 27, 2020 at 11:26:17PM -0400, Alvaro Herrera wrote:
>On 2020-Aug-28, Tatsuro Yamada wrote:
>
>> > IMO the per-type columns should show both the type being enabled as
>> > well as it being built.
>>
>> Hmm. I'm not sure how to get the status (enabled or disabled) of
>> extended stats. :(
>> Could you explain it more?
>
>pg_statistic_ext_data.stxdndistinct is not null if the stats have been
>built. (I'm not sure whether there's an easier way to determine this.)
>
It's the only way, I think. Which types were requested is stored in
pg_statistic_ext.stxkind
and what was built is in pg_statistic_ext_data. But if we want the
output to show both what was requested and which types were actually
built, that'll effectively double the number of columns needed :-(
Also, it might be useful to show the size of the statistics built, just
like we show for \d+ etc.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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@2ndquadrant.com, alvherre@2ndquadrant.com, tatsuro.yamada.tf@nttcom.co.jp, rjuju123@gmail.com, pavel.stehule@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: list of extended statistics on psql
In-Reply-To: <20200829215458.ca6pnchavgfhs2pf@development>
* 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