- databases.
+ included, such as those created explicitly with
+ linkend="sql-createstatistics"/> 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.
to the extent that schema entries are present in the archive.
- This option is mutually exclusive of
- and .
+ This option cannot be used with
+ or .
It is similar to, but for historical reasons not identical to,
specifying
.
- Once restored, it is wise to run ANALYZE on each
- restored table so the optimizer has useful statistics; see
- and
- for more information.
+ By default, pg_restore will restore optimizer statistics
+ if included in the dump file. If not all statistics were restored, it may
+ be useful to run ANALYZE on each restored table so the
+ optimizer has useful statistics; see
+ linkend="vacuum-for-statistics"/> and for more
+ information.
Statistics
- Because optimizer statistics are not transferred by pg_upgrade, you will
- be instructed to run a command to regenerate that information at the end
- of the upgrade. You might need to set connection parameters to
- match your new cluster.
+ Unless the option is specified,
+ pg_upgrade will transfer most optimizer statistics
+ from the old cluster to the new cluster. However, some statistics may
+ not be transferred, such as those created explicitly with
+ linkend="sql-createstatistics"/> or custom statistics added by an
+ extension.
+
+
+ Because not all statistics are not transferred by
+ pg_upgrade, you will be instructed to run a command to
+ regenerate that information at the end of the upgrade. You might need to
+ set connection parameters to match your new cluster.
}
pg_log(PG_REPORT,
- "Optimizer statistics are not transferred by pg_upgrade.\n"
+ "Some optimizer statistics may not have been transferred by pg_upgrade.\n"
"Once you start the new server, consider running:\n"
" %s/vacuumdb %s--all --analyze-in-stages", new_cluster.bindir, user_specification.data);