pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disallow CREATE STATISTICS on system catalogs
Date: Fri, 15 Jan 2021 22:39:35 +0000
Message-ID: <E1l0Xkl-0002UV-Ki@gemulon.postgresql.org> (raw)

Disallow CREATE STATISTICS on system catalogs

Add a check that CREATE STATISTICS does not add extended statistics on
system catalogs, similarly to indexes etc.  It can be overriden using
the allow_system_table_mods GUC.

This bug exists since 7b504eb282c, adding the extended statistics, so
backpatch all the way back to PostgreSQL 10.

Author: Tomas Vondra
Reported-by: Dean Rasheed
Backpatch-through: 10
Discussion: https://postgr.es/m/CAEZATCXAPrrOKwEsyZKQ4uzzJQWBCt6QAvOcgqRGdWwT1zb%2BrQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c9a0dc34865f2f82d8e186f534d9b605afaa4d11

Modified Files
--------------
src/backend/commands/statscmds.c        |  7 +++++++
src/test/regress/expected/stats_ext.out | 12 +++++++-----
src/test/regress/sql/stats_ext.sql      | 12 +++++++-----
3 files changed, 21 insertions(+), 10 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1l0Xkl-0002UV-Ki@gemulon.postgresql.org>
Permalink:  ../E1l0Xkl-0002UV-Ki@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1l0Xkl-0002UV-Ki@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: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Disallow CREATE STATISTICS on system catalogs
  In-Reply-To: <E1l0Xkl-0002UV-Ki@gemulon.postgresql.org>
  References: <E1l0Xkl-0002UV-Ki@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