diff options
author | Nathan Bossart <nathan@postgresql.org> | 2025-03-18 16:32:56 -0500 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2025-03-18 16:32:56 -0500 |
commit | c9d502eb68094d817fe94c2e954f6fdbb62f4d48 (patch) | |
tree | 8677ddfbef8a90a709c1d7a0140800b21cca6db8 /doc/src | |
parent | edba754f052ea0c02287080004aa6051eaa4f597 (diff) | |
download | postgresql-c9d502eb68094d817fe94c2e954f6fdbb62f4d48.tar.gz postgresql-c9d502eb68094d817fe94c2e954f6fdbb62f4d48.zip |
Update guidance for running vacuumdb after pg_upgrade.
Now that pg_upgrade can carry over most optimizer statistics, we
should recommend using vacuumdb's new --missing-stats-only option
to only analyze relations that are missing statistics.
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Discussion: https://postgr.es/m/Z5O1bpcwDrMgyrYy%40nathan
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pgupgrade.sgml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index 9ef7a84eed0..5db761d1ff1 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -807,10 +807,11 @@ psql --username=postgres --file=script.sql postgres </para> <para> - Using <command>vacuumdb --all --analyze-only</command> can efficiently - generate such statistics, and the use of <option>--jobs</option> - can speed it up. Option <option>--analyze-in-stages</option> - can be used to generate minimal statistics quickly. + Using <command>vacuumdb --all --analyze-only --missing-stats-only</command> + can efficiently generate such statistics. Alternatively, + <command>vacuumdb --all --analyze-in-stages --missing-stats-only</command> + can be used to generate minimal statistics quickly. For either command, + the use of <option>--jobs</option> can speed it up. If <varname>vacuum_cost_delay</varname> is set to a non-zero value, this can be overridden to speed up statistics generation using <envar>PGOPTIONS</envar>, e.g., <literal>PGOPTIONS='-c |