pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix extended statistics with partial analyzes
Date: Mon, 17 Apr 2017 17:03:03 +0000
Message-ID: <E1d0A3L-00015F-6h@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix extended statistics with partial analyzes

Either because of a previous ALTER TABLE .. SET STATISTICS 0 or because
of being invoked with a partial column list, ANALYZE could fail to
acquire sufficient data to build extended statistics.  Previously, this
would draw an ERROR and fail to collect any statistics at all (extended
and regular).  Change things so that we raise a WARNING instead, and
remove a hint that was wrong in half the cases.

Reported by: David Rowley
Discussion: https://postgr.es/m/CAKJS1f9Kk0NF6Fg7TA=JUXsjpS9kX6NVu27pb5QDCpOYAvb-Og@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bf2a691e02d7766f185d9d8e0f092222a5c0a129

Modified Files
--------------
src/backend/statistics/extended_stats.c | 83 +++++++++++++++++++++------------
src/test/regress/expected/stats_ext.out |  6 ++-
src/test/regress/sql/stats_ext.sql      |  2 +
3 files changed, 60 insertions(+), 31 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1d0A3L-00015F-6h@gemulon.postgresql.org>
Permalink:  ../E1d0A3L-00015F-6h@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1d0A3L-00015F-6h@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Fix extended statistics with partial analyzes
  In-Reply-To: <E1d0A3L-00015F-6h@gemulon.postgresql.org>
  References: <E1d0A3L-00015F-6h@gemulon.postgresql.org>

* 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