[COMMITTERS] pgsql: Fix dependencies for extended statistics objects. - Mailing list pgsql-committers

From Tom Lane
Subject [COMMITTERS] pgsql: Fix dependencies for extended statistics objects.
Date
Msg-id E1d9H96-0005hk-Po@gemulon.postgresql.org
Whole thread Raw
List pgsql-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(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: [COMMITTERS] pgsql: Change CREATE STATISTICS syntax
Next
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Avoid searching for the target catcache inCatalogCacheIdInvalid