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