public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Fujii Masao <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects
Date: Mon, 22 Jun 2026 16:50:34 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHGQGwG2ZrigPrGrtbYC8RQeiutwh8u50H_OjhNGA_b7+AA3wg@mail.gmail.com>
References: <[email protected]>
<CAHGQGwG2ZrigPrGrtbYC8RQeiutwh8u50H_OjhNGA_b7+AA3wg@mail.gmail.com>
On Sun, Jun 21, 2026 at 12:55:34AM +0900, Fujii Masao wrote:
> This looks like a documentation oversight in (maybe) the commit that
> added extended statistics support to pg_dump.
This is a doc oversight. While working on the support of extstats
for this release, I have looked at holes like this one in the docs,
and did not consider the pattern of a linkend based on
sql-createstatistics.
The report mentions pg_dump, but we have the same wrong pattern in the
doc pages for pg_dumpall and pg_upgrade, leading me to the attached
for these three holes.
Thoughts?
--
Michael
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index ae1bc14d2f26..0e0d53926af6 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 <option>--statistics</option> is specified,
<command>pg_dump</command> will include most optimizer statistics in the
resulting dump file. This does not include all statistics, such as
- those created explicitly with <xref linkend="sql-createstatistics"/>,
custom statistics added by an extension, or statistics collected by the
cumulative statistics system. Therefore, it may still be useful to
run <command>ANALYZE</command> 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 8834b7ec141e..238c87c13f5f 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -893,7 +893,6 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
When <option>--statistics</option> is specified,
<command>pg_dumpall</command> will include most optimizer statistics in the
resulting dump file. This does not include all statistics, such as
- those created explicitly with <xref linkend="sql-createstatistics"/>,
custom statistics added by an extension, or statistics collected by the
cumulative statistics system. Therefore, it may still be useful to
run <command>ANALYZE</command> 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 38ca09b423c3..cc44983a9a8d 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>--no-statistics</option> option is specified,
<command>pg_upgrade</command> 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
- <xref linkend="sql-createstatistics"/>, custom statistics added by
+ all statistics, such as custom statistics added by
an extension, or statistics collected by the cumulative statistics system.
</para>
Attachments:
[text/plain] extstats-restore-docs.patch (2.3K, ../[email protected]/2-extstats-restore-docs.patch)
download | inline diff:
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index ae1bc14d2f26..0e0d53926af6 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 <option>--statistics</option> is specified,
<command>pg_dump</command> will include most optimizer statistics in the
resulting dump file. This does not include all statistics, such as
- those created explicitly with <xref linkend="sql-createstatistics"/>,
custom statistics added by an extension, or statistics collected by the
cumulative statistics system. Therefore, it may still be useful to
run <command>ANALYZE</command> 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 8834b7ec141e..238c87c13f5f 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -893,7 +893,6 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
When <option>--statistics</option> is specified,
<command>pg_dumpall</command> will include most optimizer statistics in the
resulting dump file. This does not include all statistics, such as
- those created explicitly with <xref linkend="sql-createstatistics"/>,
custom statistics added by an extension, or statistics collected by the
cumulative statistics system. Therefore, it may still be useful to
run <command>ANALYZE</command> 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 38ca09b423c3..cc44983a9a8d 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>--no-statistics</option> option is specified,
<command>pg_upgrade</command> 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
- <xref linkend="sql-createstatistics"/>, custom statistics added by
+ all statistics, such as custom statistics added by
an extension, or statistics collected by the cumulative statistics system.
</para>
[application/pgp-signature] signature.asc (833B, ../[email protected]/3-signature.asc)
download
view thread (3+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox