diff options
author | Bruce Momjian <bruce@momjian.us> | 2023-12-07 20:06:23 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2023-12-07 20:06:23 -0500 |
commit | c0fcf077708c99d64c86087eb567999cb85848e0 (patch) | |
tree | 88d9d71b78b3e849d40b3ee9f9fbc89d3354823e | |
parent | 5134e9d295f335b4ee9f8846f934e5593f65e881 (diff) | |
download | postgresql-c0fcf077708c99d64c86087eb567999cb85848e0.tar.gz postgresql-c0fcf077708c99d64c86087eb567999cb85848e0.zip |
doc, pg_upgrade: add vacuumdb w/ tips for generating quick stats
Reported-by: Magnus Hagander
Discussion: https://postgr.es/m/CABUevEwGBY-W7EkTbjMY1rC+mmRL3fMrnX6YaUkcr+7o9PSa3w@mail.gmail.com
Backpatch-through: master
-rw-r--r-- | doc/src/sgml/ref/pgupgrade.sgml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index 4f78e0e1c0b..2520f6c50dd 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -784,6 +784,17 @@ psql --username=postgres --file=script.sql postgres of the upgrade. You might need to set connection parameters to match your new cluster. </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. + 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 + vacuum_cost_delay=0' vacuumdb ...</literal>. + </para> </step> <step> |