1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-19 17:02:53 +03:00

vacuumdb: enable parallel mode

This mode allows vacuumdb to open several server connections to vacuum
or analyze several tables simultaneously.

Author: Dilip Kumar.  Some reworking by Álvaro Herrera
Reviewed by: Jeff Janes, Amit Kapila, Magnus Hagander, Andres Freund
This commit is contained in:
Alvaro Herrera
2015-01-23 15:02:45 -03:00
parent 5cefbf5a6c
commit a179232047
5 changed files with 721 additions and 191 deletions

View File

@@ -203,6 +203,30 @@ PostgreSQL documentation
</listitem>
</varlistentry>
<varlistentry>
<term><option>-j <replaceable class="parameter">njobs</replaceable></option></term>
<term><option>--jobs=<replaceable class="parameter">njobs</replaceable></option></term>
<listitem>
<para>
Execute the vacuum or analyze commands in parallel by running
<replaceable class="parameter">njobs</replaceable>
commands simultaneously. This option reduces the time of the
processing but it also increases the load on the database server.
</para>
<para>
<application>vacuumdb</application> will open
<replaceable class="parameter">njobs</replaceable> connections to the
database, so make sure your <xref linkend="guc-max-connections">
setting is high enough to accommodate all connections.
</para>
<para>
Note that using this mode together with the <option>-f</option>
(<literal>FULL</literal>) option might cause deadlock failures if
certain system catalogs are processed in parallel.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--analyze-in-stages</option></term>
<listitem>