Skip to content

Commit 792353f

Browse files
committed
doc: clarify that pg_upgrade preserves "optimizer" stats.
Reported-by: Rambabu V Author: Robert Treat Discussion: https://postgr.es/m/CADtiZxrUzRRX6edyN2y-7U5HA8KSXttee7K=EFTLXjwG1SCE4A@mail.gmail.com Backpatch-through: 18
1 parent a6eac22 commit 792353f

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

doc/src/sgml/ref/pg_dump.sgml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ PostgreSQL documentation
13931393
<term><option>--statistics</option></term>
13941394
<listitem>
13951395
<para>
1396-
Dump statistics.
1396+
Dump optimizer statistics.
13971397
</para>
13981398
</listitem>
13991399
</varlistentry>
@@ -1403,7 +1403,7 @@ PostgreSQL documentation
14031403
<listitem>
14041404
<para>
14051405
Dump only the statistics, not the schema (data definitions) or data.
1406-
Statistics for tables, materialized views, foreign tables,
1406+
Optimizer statistics for tables, materialized views, foreign tables,
14071407
and indexes are dumped.
14081408
</para>
14091409
</listitem>
@@ -1699,11 +1699,12 @@ CREATE DATABASE foo WITH TEMPLATE template0;
16991699
</para>
17001700

17011701
<para>
1702-
If <option>--statistics</option> is specified,
1702+
When <option>--statistics</option> is specified,
17031703
<command>pg_dump</command> will include most optimizer statistics in the
1704-
resulting dump file. However, some statistics may not be included, such as
1705-
those created explicitly with <xref linkend="sql-createstatistics"/> or
1706-
custom statistics added by an extension. Therefore, it may be useful to
1704+
resulting dump file. This does not include all statistics, such as
1705+
those created explicitly with <xref linkend="sql-createstatistics"/>,
1706+
custom statistics added by an extension, or statistics collected by the
1707+
cumulative statistics system. Therefore, it may still be useful to
17071708
run <command>ANALYZE</command> after restoring from a dump file to ensure
17081709
optimal performance; see <xref linkend="vacuum-for-statistics"/> and <xref
17091710
linkend="autovacuum"/> for more information.

doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
639639
<term><option>--statistics</option></term>
640640
<listitem>
641641
<para>
642-
Dump statistics.
642+
Dump optimizer statistics.
643643
</para>
644644
</listitem>
645645
</varlistentry>
@@ -649,7 +649,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
649649
<listitem>
650650
<para>
651651
Dump only the statistics, not the schema (data definitions) or data.
652-
Statistics for tables, materialized views, foreign tables,
652+
Optimizer statistics for tables, materialized views, foreign tables,
653653
and indexes are dumped.
654654
</para>
655655
</listitem>
@@ -890,11 +890,12 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
890890
</para>
891891

892892
<para>
893-
If <option>--statistics</option> is specified,
893+
When <option>--statistics</option> is specified,
894894
<command>pg_dumpall</command> will include most optimizer statistics in the
895-
resulting dump file. However, some statistics may not be included, such as
896-
those created explicitly with <xref linkend="sql-createstatistics"/> or
897-
custom statistics added by an extension. Therefore, it may be useful to
895+
resulting dump file. This does not include all statistics, such as
896+
those created explicitly with <xref linkend="sql-createstatistics"/>,
897+
custom statistics added by an extension, or statistics collected by the
898+
cumulative statistics system. Therefore, it may still be useful to
898899
run <command>ANALYZE</command> on each database after restoring from a dump
899900
file to ensure optimal performance. You can also run <command>vacuumdb -a
900901
-z</command> to analyze all databases.

0 commit comments

Comments
 (0)