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:47:57 +0000
Message-ID: <E1l0Xsr-0002YX-Ge@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
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/943a113bcb6fb913814ae32cbd4dd1ed29498750
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(-)
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: <E1l0Xsr-0002YX-Ge@gemulon.postgresql.org>
References: <E1l0Xsr-0002YX-Ge@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