Skip to content

Commit c7c1c19

Browse files
Peter SmithCommitfest Bot
authored andcommitted
VCI module - documentation
1 parent 1fec034 commit c7c1c19

File tree

3 files changed

+152
-0
lines changed

3 files changed

+152
-0
lines changed

doc/src/sgml/contrib.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ CREATE EXTENSION <replaceable>extension_name</replaceable>;
176176
&tsm-system-time;
177177
&unaccent;
178178
&uuid-ossp;
179+
&vci;
179180
&xml2;
180181

181182
</appendix>

doc/src/sgml/filelist.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
<!ENTITY unaccent SYSTEM "unaccent.sgml">
173173
<!ENTITY uuid-ossp SYSTEM "uuid-ossp.sgml">
174174
<!ENTITY vacuumlo SYSTEM "vacuumlo.sgml">
175+
<!ENTITY vci SYSTEM "vci.sgml">
175176
<!ENTITY xml2 SYSTEM "xml2.sgml">
176177

177178
<!-- appendixes -->

doc/src/sgml/vci.sgml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<!-- doc/src/sgml/vci.sgml -->
2+
3+
<sect1 id="vci" xreflabel="vci">
4+
<title>vci &mdash; Vertical Clustered Index</title>
5+
6+
<indexterm zone="vci">
7+
<primary>vci</primary>
8+
</indexterm>
9+
10+
<para>
11+
<literal>vci</literal> provides a columnar store that is implemented using
12+
<productname>PostgreSQL</productname> index access methods (see <xref linkend="indexam"/>).
13+
All data can be stored in memory.
14+
</para>
15+
16+
<para>
17+
This module must be loaded by adding <literal>vci</literal> to both
18+
<xref linkend="guc-shared-preload-libraries"/> and <xref linkend="guc-session-preload-libraries"/>
19+
in <filename>postgresql.conf</filename>, as it requires additional shared memory.
20+
A server restart is required to add or remove the module.
21+
</para>
22+
23+
<sect2 id="vci-functions">
24+
<title>Functions</title>
25+
26+
<variablelist>
27+
<varlistentry>
28+
<term>
29+
<function>vci_runs_in_query() returns bool</function>
30+
<indexterm>
31+
<primary>vci_runs_in_query</primary>
32+
</indexterm>
33+
</term>
34+
35+
<listitem>
36+
37+
<para>
38+
Returns <literal>true</literal> if a VCI index and custom scan are used
39+
in the current query execution. This function is typically used to verify
40+
whether a query is processed using VCI. For example:
41+
42+
<programlisting>
43+
SELECT vci_runs_in_query() AS vci_runs_in_query, key, count(*) FROM test_table;
44+
</programlisting>
45+
46+
</para>
47+
</listitem>
48+
</varlistentry>
49+
</variablelist>
50+
</sect2>
51+
52+
<sect2 id="vci-parameters">
53+
<title>Parameters</title>
54+
<variablelist>
55+
56+
<varlistentry id="guc-vci-cost-threshold" xreflabel="vci.cost_threshold">
57+
<term>
58+
<varname>vci.cost_threshold</varname> (<type>integer</type>)
59+
<indexterm>
60+
<primary><varname>vci.cost_threshold</varname> configuration parameter</primary>
61+
</indexterm>
62+
</term>
63+
<listitem>
64+
<para>
65+
Specifies the CPU cost threshold beyond which the VCI control worker will
66+
stop running.
67+
</para>
68+
</listitem>
69+
</varlistentry>
70+
71+
<varlistentry id="guc-vci-log-query" xreflabel="vci.log_query">
72+
<term>
73+
<varname>vci.log_query</varname> (<type>boolean</type>)
74+
<indexterm>
75+
<primary><varname>vci.log_query</varname> configuration parameter</primary>
76+
</indexterm>
77+
</term>
78+
<listitem>
79+
<para>
80+
Logs a message when a query cannot be executed using VCI.
81+
</para>
82+
</listitem>
83+
</varlistentry>
84+
85+
<varlistentry id="guc-vci-maintenance-work-mem" xreflabel="vci.maintenance_work_mem">
86+
<term>
87+
<varname>vci.maintenance_work_mem</varname> (<type>integer</type>)
88+
<indexterm>
89+
<primary><varname>vci.maintenance_work_mem</varname> configuration parameter</primary>
90+
</indexterm>
91+
</term>
92+
<listitem>
93+
<para>
94+
Specifies the maximum amount of memory that can be used by each VCI control
95+
worker during maintenance operations.
96+
</para>
97+
</listitem>
98+
</varlistentry>
99+
100+
</variablelist>
101+
<para>
102+
TBD. There are many more parameters which are not yet documented.
103+
</para>
104+
</sect2>
105+
106+
<sect2 id="vci-examples">
107+
<title>Examples</title>
108+
<para>
109+
TBD. Add examples here.
110+
</para>
111+
</sect2>
112+
113+
<sect2 id="vci-limitations">
114+
<title>Limitations</title>
115+
<para>
116+
<itemizedlist>
117+
<listitem>
118+
<para>
119+
Currently, only a limited set of data types is supported for indexing with VCI.
120+
</para>
121+
</listitem>
122+
<listitem>
123+
<para>
124+
This extension does not support the <command>ALTER EXTENSION UPDATE</command> command.
125+
</para>
126+
</listitem>
127+
<listitem>
128+
<para>
129+
The command <command>ALTER INDEX</command> cannot be used for VCI indexes.
130+
</para>
131+
</listitem>
132+
<listitem>
133+
<para>
134+
VCI indexes cannot be used with the <command>CLUSTER</command> command.
135+
</para>
136+
</listitem>
137+
</itemizedlist>
138+
</para>
139+
</sect2>
140+
141+
142+
<sect2 id="vci-authors">
143+
<title>Authors</title>
144+
<para>
145+
Aya Iwata <email>[email protected]</email>,
146+
Fujitsu Limited, Kanagawa, Japan
147+
</para>
148+
</sect2>
149+
150+
</sect1>

0 commit comments

Comments
 (0)