Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorJeff Davis2025-05-27 19:53:10 +0000
committerJeff Davis2025-05-27 20:54:38 +0000
commit34eb2a80d5a3ea1392e4a9f16ebac54e96d0c6ed (patch)
tree1abbe0742dc1a322bad10e4fcfe365ceadecab53 /doc/src
parent4c08ecd1618e3c5da664ba24a4aa7052772c4616 (diff)
Change pg_dump default for statistics export.
Set the default behavior of pg_dump and pg_dumpall to be --no-statistics. Leave the default for pg_restore and pg_upgrade to be --with-statistics. Discussion: https://postgr.es/m/CA+TgmoZ9=RnWcCOZiKYYjZs_AW1P4QXCw--h4dOLLHuf1Omung@mail.gmail.com Reviewed-by: Greg Sabino Mullane <htamfids@gmail.com> Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Robert Haas <robertmhaas@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml20
-rw-r--r--doc/src/sgml/ref/pg_dumpall.sgml20
2 files changed, 20 insertions, 20 deletions
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index c10bca63e55..d7595a7e546 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1134,7 +1134,7 @@ PostgreSQL documentation
<term><option>--no-statistics</option></term>
<listitem>
<para>
- Do not dump statistics.
+ Do not dump statistics. This is the default.
</para>
</listitem>
</varlistentry>
@@ -1461,7 +1461,7 @@ PostgreSQL documentation
<term><option>--with-statistics</option></term>
<listitem>
<para>
- Dump statistics. This is the default.
+ Dump statistics.
</para>
</listitem>
</varlistentry>
@@ -1681,14 +1681,14 @@ CREATE DATABASE foo WITH TEMPLATE template0;
</para>
<para>
- By default, <command>pg_dump</command> will include most optimizer
- statistics in the resulting dump file. However, some statistics may not be
- included, such as those created explicitly with <xref
- linkend="sql-createstatistics"/> or custom statistics added by an
- extension. Therefore, it may be useful to run <command>ANALYZE</command>
- after restoring from a dump file to ensure optimal performance; see <xref
- linkend="vacuum-for-statistics"/> and <xref linkend="autovacuum"/> for more
- information.
+ If <option>--with-statistics</option> is specified,
+ <command>pg_dump</command> will include most optimizer statistics in the
+ resulting dump file. However, some statistics may not be included, such as
+ those created explicitly with <xref linkend="sql-createstatistics"/> or
+ custom statistics added by an extension. Therefore, it may be useful to
+ run <command>ANALYZE</command> after restoring from a dump file to ensure
+ optimal performance; see <xref linkend="vacuum-for-statistics"/> and <xref
+ linkend="autovacuum"/> for more information.
</para>
<para>
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 8c5141d036c..723a466cfaa 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -567,7 +567,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
<term><option>--no-statistics</option></term>
<listitem>
<para>
- Do not dump statistics.
+ Do not dump statistics. This is the default.
</para>
</listitem>
</varlistentry>
@@ -741,7 +741,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
<term><option>--with-statistics</option></term>
<listitem>
<para>
- Dump statistics. This is the default.
+ Dump statistics.
</para>
</listitem>
</varlistentry>
@@ -957,14 +957,14 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
</para>
<para>
- By default, <command>pg_dumpall</command> will include most optimizer
- statistics in the resulting dump file. However, some statistics may not be
- included, such as those created explicitly with <xref
- linkend="sql-createstatistics"/> or custom statistics added by an
- extension. Therefore, it may be useful to run <command>ANALYZE</command>
- on each database after restoring from a dump file to ensure optimal
- performance. You can also run <command>vacuumdb -a -z</command> to analyze
- all databases.
+ If <option>--with-statistics</option> is specified,
+ <command>pg_dumpall</command> will include most optimizer statistics in the
+ resulting dump file. However, some statistics may not be included, such as
+ those created explicitly with <xref linkend="sql-createstatistics"/> or
+ custom statistics added by an extension. Therefore, it may be useful to
+ run <command>ANALYZE</command> on each database after restoring from a dump
+ file to ensure optimal performance. You can also run <command>vacuumdb -a
+ -z</command> to analyze all databases.
</para>
<para>