From 34eb2a80d5a3ea1392e4a9f16ebac54e96d0c6ed Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Tue, 27 May 2025 12:53:10 -0700 Subject: 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 Reviewed-by: Nathan Bossart Reviewed-by: Robert Haas Reviewed-by: Tom Lane --- doc/src/sgml/ref/pg_dump.sgml | 20 ++++++++++---------- doc/src/sgml/ref/pg_dumpall.sgml | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'doc/src') 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 - Do not dump statistics. + Do not dump statistics. This is the default. @@ -1461,7 +1461,7 @@ PostgreSQL documentation - Dump statistics. This is the default. + Dump statistics. @@ -1681,14 +1681,14 @@ CREATE DATABASE foo WITH TEMPLATE template0; - By default, pg_dump will include most optimizer - statistics in the resulting dump file. However, some statistics may not be - included, such as those created explicitly with or custom statistics added by an - extension. Therefore, it may be useful to run ANALYZE - after restoring from a dump file to ensure optimal performance; see and for more - information. + If is specified, + pg_dump will include most optimizer statistics in the + resulting dump file. However, some statistics may not be included, such as + those created explicitly with or + custom statistics added by an extension. Therefore, it may be useful to + run ANALYZE after restoring from a dump file to ensure + optimal performance; see and for more information. 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 PATTERN - Do not dump statistics. + Do not dump statistics. This is the default. @@ -741,7 +741,7 @@ exclude database PATTERN - Dump statistics. This is the default. + Dump statistics. @@ -957,14 +957,14 @@ exclude database PATTERN - By default, pg_dumpall will include most optimizer - statistics in the resulting dump file. However, some statistics may not be - included, such as those created explicitly with or custom statistics added by an - extension. Therefore, it may be useful to run ANALYZE - on each database after restoring from a dump file to ensure optimal - performance. You can also run vacuumdb -a -z to analyze - all databases. + If is specified, + pg_dumpall will include most optimizer statistics in the + resulting dump file. However, some statistics may not be included, such as + those created explicitly with or + custom statistics added by an extension. Therefore, it may be useful to + run ANALYZE on each database after restoring from a dump + file to ensure optimal performance. You can also run vacuumdb -a + -z to analyze all databases. -- cgit v1.2.3