From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Adrien Nayrat <adrien.nayrat@dalibo.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: PATCH: multivariate histograms and MCV lists
Date: Sat, 26 Aug 2017 16:14:24 +0200
Message-ID: <b3688203-7c5d-2d7e-58b6-a6bb04f29b5c@2ndquadrant.com> (raw)
In-Reply-To: <31ee8686-6d62-7f10-4129-7580ec74a710@dalibo.com>
References: <dfdac334-9cf2-2597-fb27-f0fb3753f435@2ndquadrant.com>
<31ee8686-6d62-7f10-4129-7580ec74a710@dalibo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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, adrien.nayrat@dalibo.com
Subject: Re: PATCH: multivariate histograms and MCV lists
In-Reply-To: <b3688203-7c5d-2d7e-58b6-a6bb04f29b5c@2ndquadrant.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