From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: multivariate histograms and MCV lists |
Date: | 2017-08-26 14:14:24 |
Message-ID: | b3688203-7c5d-2d7e-58b6-a6bb04f29b5c@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08/17/2017 12:06 PM, Adrien Nayrat wrote:>
> Hello,
>
> There is no check of "statistics type/kind" in
> pg_stats_ext_mcvlist_items and pg_histogram_buckets.
>
> select stxname,stxkind from pg_statistic_ext ; stxname | stxkind
> -----------+--------- stts3 | {h} stts2 | {m}
>
> So you can call :
>
> SELECT * FROM pg_mcv_list_items((SELECT oid FROM pg_statistic_ext
> WHERE stxname = 'stts3'));
>
> SELECT * FROM pg_histogram_buckets((SELECT oid FROM pg_statistic_ext
> WHERE stxname = 'stts2'), 0);
>
> Both crashes.
>
Thanks for the report, this is clearly a bug. I don't think we need to
test the stxkind, but rather a missing check that the requested type is
actually built.
> Unfotunately, I don't have the knowledge to produce a patch :/
>
> Small fix in documentation, patch attached.
>
Thanks, will fix.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-08-26 15:08:56 | Re: Variable substitution in psql backtick expansion |
Previous Message | Michael Meskes | 2017-08-26 12:26:37 | Build failure on thrips |