summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/vacuum.sgml
diff options
context:
space:
mode:
authorRobert Haas2019-04-04 18:58:53 +0000
committerRobert Haas2019-04-04 19:04:43 +0000
commita96c41feec6b6616eb9d5baee9a9e08c20533c38 (patch)
tree8224a04fbe5c2165fd2ed18655aa63259c234ae4 /doc/src/sgml/ref/vacuum.sgml
parent74eb2176bf3ac7a2fae1282b4f4f1d000f3e6d78 (diff)
Allow VACUUM to be run with index cleanup disabled.
This commit adds a new reloption, vacuum_index_cleanup, which controls whether index cleanup is performed for a particular relation by default. It also adds a new option to the VACUUM command, INDEX_CLEANUP, which can be used to override the reloption. If neither the reloption nor the VACUUM option is used, the default is true, as before. Masahiko Sawada, reviewed and tested by Nathan Bossart, Alvaro Herrera, Kyotaro Horiguchi, Darafei Praliaskouski, and me. The wording of the documentation is mostly due to me. Discussion: http://postgr.es/m/CAD21AoAt5R3DNUZSjOoXDUY=naYPUOuffVsRzuTYMz29yLzQCA@mail.gmail.com
Diffstat (limited to 'doc/src/sgml/ref/vacuum.sgml')
-rw-r--r--doc/src/sgml/ref/vacuum.sgml23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml
index 906d0c2ad7c..fdd81512209 100644
--- a/doc/src/sgml/ref/vacuum.sgml
+++ b/doc/src/sgml/ref/vacuum.sgml
@@ -32,6 +32,7 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet
ANALYZE [ <replaceable class="parameter">boolean</replaceable> ]
DISABLE_PAGE_SKIPPING [ <replaceable class="parameter">boolean</replaceable> ]
SKIP_LOCKED [ <replaceable class="parameter">boolean</replaceable> ]
+ INDEX_CLEANUP [ <replaceable class="parameter">boolean</replaceable> ]
<phrase>and <replaceable class="parameter">table_and_columns</replaceable> is:</phrase>
@@ -182,6 +183,28 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet
</varlistentry>
<varlistentry>
+ <term><literal>INDEX_CLEANUP</literal></term>
+ <listitem>
+ <para>
+ Specifies that <command>VACUUM</command> should attempt to remove
+ index entries pointing to dead tuples. This is normally the desired
+ behavior and is the default unless the
+ <literal>vacuum_index_cleanup</literal> option has been set to false
+ for the table to be vacuumed. Setting this option to false may be
+ useful when it is necessary to make vacuum run as quickly as possible,
+ for example to avoid imminent transaction ID wraparound
+ (see <xref linkend="vacuum-for-wraparound"/>). However, if index
+ cleanup is not performed regularly, performance may suffer, because
+ as the table is modified, indexes will accumulate dead tuples
+ and the table itself will accumulate dead line pointers that cannot be
+ removed until index cleanup is completed. This option has no effect
+ for tables that do not have an index and is ignored if the
+ <literal>FULL</literal> is used.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><replaceable class="parameter">boolean</replaceable></term>
<listitem>
<para>