From f0a4f280b4d3cd16c368c524fe0c212643615f46 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 23 Jun 2026 08:20:11 +0900 Subject: [PATCH] doc: Update pg_dump/dumpall/upgrade about handling of external statistics The pages of pg_dump, pg_dumpall and pg_upgrade mentioned that their --no-statistics and --statistics options did not include the handling of statistics created by CREATE STATISTICS, which was wrong. Oversight in c32fb29e979d. Reported-by: Igi Izumi Discussion: https://postgr.es/m/19529-c7eb1e7a0b07eae6@postgresql.org --- doc/src/sgml/ref/pg_dump.sgml | 1 - doc/src/sgml/ref/pg_dumpall.sgml | 1 - doc/src/sgml/ref/pgupgrade.sgml | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index ae1bc14d2f2..0e0d53926af 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -1703,7 +1703,6 @@ CREATE DATABASE foo WITH TEMPLATE template0; When is specified, pg_dump will include most optimizer statistics in the resulting dump file. This does not include all statistics, such as - those created explicitly with , custom statistics added by an extension, or statistics collected by the cumulative statistics system. Therefore, it may still be useful to run ANALYZE after restoring from a dump file to ensure diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index 8834b7ec141..238c87c13f5 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -893,7 +893,6 @@ exclude database PATTERN When is specified, pg_dumpall will include most optimizer statistics in the resulting dump file. This does not include all statistics, such as - those created explicitly with , custom statistics added by an extension, or statistics collected by the cumulative statistics system. Therefore, it may still be useful to run ANALYZE on each database after restoring from a dump diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index 38ca09b423c..cc44983a9a8 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -834,8 +834,7 @@ psql --username=postgres --file=script.sql postgres Unless the option is specified, pg_upgrade will transfer most optimizer statistics from the old cluster to the new cluster. This does not transfer - all statistics, such as those created explicitly with - , custom statistics added by + all statistics, such as custom statistics added by an extension, or statistics collected by the cumulative statistics system.