PATCH: multivariate histograms and MCV lists

Tomas Vondra <tomas.vondra@2ndquadrant.com>

From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-08-13T22:48:27Z
Lists: pgsql-hackers

Attachments

Hi all,

For PostgreSQL 10 we managed to get the basic CREATE STATISTICS bits in 
(grammar, infrastructure, and two simple types of statistics). See:

     https://commitfest.postgresql.org/13/852/

This patch presents a rebased version of the remaining parts, adding 
more complex statistic types (MCV lists and histograms), and hopefully 
some additional improvements.

The code was rebased on top of current master, and I've made various 
improvements to match how the committed parts were reworked. So the 
basic idea and shape remains the same, the tweaks are mostly small.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Convert pre-existing stats_ext tests to new style

  2. Add support for multivariate MCV lists

  3. Improve ANALYZE's strategy for finding MCVs.

  4. Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)

  5. Try again to fix accumulation of parallel worker instrumentation.

  6. Adjust psql \d query to avoid use of @> operator.

  7. Message style fixes

  8. Add security checks to selectivity estimation functions