From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add functions pg_restore_relation_stats(), pg_restore_attribute_
Date: Thu, 24 Oct 2024 19:09:12 +0000
Message-ID: <E1t43Cq-002GpH-Tb@gemulon.postgresql.org> (raw)
Add functions pg_restore_relation_stats(), pg_restore_attribute_stats().
Similar to the pg_set_*_stats() functions, except with a variadic
signature that's designed to be more future-proof. Additionally, most
problems are reported as WARNINGs rather than ERRORs, allowing most
stats to be restored even if some cannot.
These functions are intended to be called from pg_dump to avoid the
need to run ANALYZE after an upgrade.
Author: Corey Huinker
Discussion: https://postgr.es/m/CADkLM=eErgzn7ECDpwFcptJKOk9SxZEk5Pot4d94eVTZsvj3gw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d32d1463995c036853eeb9ec99cc367ffc7794ae
Modified Files
--------------
doc/src/sgml/func.sgml | 100 +++
src/backend/statistics/attribute_stats.c | 19 +
src/backend/statistics/relation_stats.c | 60 +-
src/backend/statistics/stat_utils.c | 126 ++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 20 +-
src/include/statistics/stat_utils.h | 5 +
src/test/regress/expected/stats_import.out | 955 +++++++++++++++++++++++++++--
src/test/regress/sql/stats_import.sql | 696 ++++++++++++++++++++-
9 files changed, 1891 insertions(+), 92 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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add functions pg_restore_relation_stats(), pg_restore_attribute_
In-Reply-To: <E1t43Cq-002GpH-Tb@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