Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c0fcf07

Browse files
committed
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
1 parent 5134e9d commit c0fcf07

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/src/sgml/ref/pgupgrade.sgml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,17 @@ psql --username=postgres --file=script.sql postgres
784784
of the upgrade. You might need to set connection parameters to
785785
match your new cluster.
786786
</para>
787+
788+
<para>
789+
Using <command>vacuumdb --all --analyze-only</command> can efficiently
790+
generate such statistics, and the use of <option>--jobs</option>
791+
can speed it up. Option <option>--analyze-in-stages</option>
792+
can be used to generate minimal statistics quickly.
793+
If <varname>vacuum_cost_delay</varname> is set to a non-zero
794+
value, this can be overridden to speed up statistics generation
795+
using <envar>PGOPTIONS</envar>, e.g., <literal>PGOPTIONS='-c
796+
vacuum_cost_delay=0' vacuumdb ...</literal>.
797+
</para>
787798
</step>
788799

789800
<step>

0 commit comments

Comments
 (0)