| From: | Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Disallow CREATE STATISTICS on system catalogs |
| Date: | 2021-01-15 22:50:49 |
| Message-ID: | E1l0Xvd-0002aJ-Tr@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/c22539756ee5492547badc821023e7fdf4bee4ef
Modified Files
--------------
src/backend/commands/statscmds.c | 8 ++++++++
src/test/regress/expected/stats_ext.out | 12 +++++++-----
src/test/regress/sql/stats_ext.sql | 12 +++++++-----
3 files changed, 22 insertions(+), 10 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2021-01-16 04:44:34 | pgsql: Remove unnecessary pstrdup in fetch_table_list. |
| Previous Message | Tomas Vondra | 2021-01-15 22:49:24 | pgsql: Disallow CREATE STATISTICS on system catalogs |