pgsql: Create functions pg_set_relation_stats, pg_clear_relation_stats.

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Create functions pg_set_relation_stats, pg_clear_relation_stats.
Date: 2024-10-11 23:57:10
Message-ID: E1szPVO-000NMT-OQ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Create functions pg_set_relation_stats, pg_clear_relation_stats.

These functions are used to tweak statistics on any relation, provided
that the user has MAINTAIN privilege on the relation, or is the database
owner.

Bump catalog version.

Author: Corey Huinker
Discussion: https://postgr.es/m/CADkLM=eErgzn7ECDpwFcptJKOk9SxZEk5Pot4d94eVTZsvj3gw@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/func.sgml | 94 +++++++++++++
src/backend/catalog/system_functions.sql | 10 ++
src/backend/statistics/Makefile | 4 +-
src/backend/statistics/meson.build | 2 +
src/backend/statistics/relation_stats.c | 210 +++++++++++++++++++++++++++++
src/backend/statistics/stat_utils.c | 94 +++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 15 +++
src/include/statistics/stat_utils.h | 29 ++++
src/test/regress/expected/stats_import.out | 143 ++++++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/sql/stats_import.sql | 98 ++++++++++++++
12 files changed, 700 insertions(+), 3 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2024-10-12 00:01:49 pgsql: Fix missed case for builtin collation provider.
Previous Message Alexander Korotkov 2024-10-11 23:33:11 Re: pgsql: Implement pg_wal_replay_wait() stored procedure