summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/create_index.sgml
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2017-04-01 14:00:53 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2017-04-01 14:00:53 -0300
commit7526e10224f0792201e99631567bbe44492bbde4 (patch)
tree0f571916efeee40d0f94df78a3478966ef4f1e7b /doc/src/sgml/ref/create_index.sgml
parent7220c7b3e5c847227fbfe53bbaca326044674a6c (diff)
BRIN auto-summarization
Previously, only VACUUM would cause a page range to get initially summarized by BRIN indexes, which for some use cases takes too much time since the inserts occur. To avoid the delay, have brininsert request a summarization run for the previous range as soon as the first tuple is inserted into the first page of the next range. Autovacuum is in charge of processing these requests, after doing all the regular vacuuming/ analyzing work on tables. This doesn't impose any new tasks on autovacuum, because autovacuum was already in charge of doing summarizations. The only actual effect is to change the timing, i.e. that it occurs earlier. For this reason, we don't go any great lengths to record these requests very robustly; if they are lost because of a server crash or restart, they will happen at a later time anyway. Most of the new code here is in autovacuum, which can now be told about "work items" to process. This can be used for other things such as GIN pending list cleaning, perhaps visibility map bit setting, both of which are currently invoked during vacuum, but do not really depend on vacuum taking place. The requests are at the page range level, a granularity for which we did not have SQL-level access; we only had index-level summarization requests via brin_summarize_new_values(). It seems reasonable to add SQL-level access to range-level summarization too, so add a function brin_summarize_range() to do that. Authors: Álvaro Herrera, based on sketch from Simon Riggs. Reviewed-by: Thomas Munro. Discussion: https://postgr.es/m/20170301045823.vneqdqkmsd4as4ds@alvherre.pgsql
Diffstat (limited to 'doc/src/sgml/ref/create_index.sgml')
-rw-r--r--doc/src/sgml/ref/create_index.sgml12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 7163b032b1b..83ee7d3f252 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -382,7 +382,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
</variablelist>
<para>
- <acronym>BRIN</> indexes accept a different parameter:
+ <acronym>BRIN</> indexes accept different parameters:
</para>
<variablelist>
@@ -396,6 +396,16 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><literal>autosummarize</></term>
+ <listitem>
+ <para>
+ Defines whether a summarization run is invoked for the previous page
+ range whenever an insertion is detected on the next one.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect2>