pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix dependencies for extended statistics objects.
Date: Fri, 12 May 2017 20:26:40 +0000
Message-ID: <E1d9H96-0005hk-Po@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix dependencies for extended statistics objects.

A stats object ought to have a dependency on each individual column
it reads, not the entire table.  Doing this honestly lets us get rid
of the hard-wired logic in RemoveStatisticsExt, which seems to have
been misguidedly modeled on RemoveStatistics; and it will be far easier
to extend to multiple tables later.

Also, add overlooked dependency on owner, and make the dependency on
schema be NORMAL like every other such dependency.

There remains some unfinished work here, which is to allow statistics
objects to be extension members.  That takes more effort than just
adding the dependency call, though, so I left it out for now.

initdb forced because this changes the set of pg_depend records that
should exist for a statistics object.

Discussion: https://postgr.es/m/22676.1494557205@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/928c4de30991ca24a46a92f006892c039af30833

Modified Files
--------------
src/backend/catalog/heap.c              | 74 ---------------------------------
src/backend/commands/statscmds.c        | 52 +++++++++++++----------
src/include/catalog/catversion.h        |  2 +-
src/include/catalog/heap.h              |  1 -
src/test/regress/expected/stats_ext.out | 14 ++++++-
src/test/regress/sql/stats_ext.sql      |  5 ++-
6 files changed, 48 insertions(+), 100 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: <E1d9H96-0005hk-Po@gemulon.postgresql.org>
Permalink:  ../E1d9H96-0005hk-Po@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1d9H96-0005hk-Po@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix dependencies for extended statistics objects.
  In-Reply-To: <E1d9H96-0005hk-Po@gemulon.postgresql.org>
  References: <E1d9H96-0005hk-Po@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