Reword doc blurb for vacuumdb --analyze-in-stages

Make users aware that using it in a database with existing stats might
cause transient problems.

Author: Nikolai Berkoff <nikolai.berkoff@pm.me>
Discussion: https://postgr.es/m/s-kSljtWXMWgMfGTztPTPcS80R8FHdOrBxDTnrQI6GMZbT7au1A4b0fzaSFtKwCI8nwN0MhgPLfVOTvJ7DwTjkip4P3d0o4VgrMJs4OLN-o=@pm.me
This commit is contained in:
Alvaro Herrera 2021-11-05 11:22:30 -03:00
parent bef47ff85d
commit 00a354a135
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
1 changed files with 10 additions and 6 deletions

View File

@ -398,15 +398,19 @@ PostgreSQL documentation
<para> <para>
Only calculate statistics for use by the optimizer (no vacuum), Only calculate statistics for use by the optimizer (no vacuum),
like <option>--analyze-only</option>. Run several (currently three) like <option>--analyze-only</option>. Run several (currently three)
stages of analyze with different configuration settings, to produce stages of analyze; the first stage uses the lowest possible statistics
usable statistics faster. target (see <xref linkend="guc-default-statistics-target"/>)
to produce usable statistics faster, and subsequent stages build the
full statistics.
</para> </para>
<para> <para>
This option is useful to analyze a database that was newly populated This option is only useful to analyze a database that current has
from a restored dump or by <command>pg_upgrade</command>. This option no statistics or wholly incorrect ones, such as if it is newly
will try to create some statistics as fast as possible, to make the populated from a restored dump or by <command>pg_upgrade</command>.
database usable, and then produce full statistics in the subsequent Be aware that running this option in a database with existing
statistics may cause the query optimizer choices to become
transiently worse due to the low statistics targets of the early
stages. stages.
</para> </para>
</listitem> </listitem>