summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 392eb700b0c..de84b777300 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -3802,6 +3802,51 @@ SELECT * FROM parent WHERE key = 2400;
</listitem>
</varlistentry>
+ <varlistentry id="guc-force-parallel-mode" xreflabel="force_parallel_mode">
+ <term><varname>force_parallel_mode</varname> (<type>enum</type>)
+ <indexterm>
+ <primary><varname>force_parallel_mode</> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Allows the use of parallel queries for testing purposes even in cases
+ where no performance benefit is expected.
+ The allowed values of <varname>force_parallel_mode</> are
+ <literal>off</> (use parallel mode only when it is expected to improve
+ performance), <literal>on</> (force parallel query for all queries
+ for which it is thought to be safe), and <literal>regress</> (like
+ on, but with additional behavior changes to facilitate automated
+ regression testing).
+ </para>
+
+ <para>
+ More specifically, setting this value to <literal>on</> will add
+ a <literal>Gather</> node to the top of any query plan for which this
+ appears to be safe, so that the query runs inside of a parallel worker.
+ Even when a parallel worker is not available or cannot be used,
+ operations such as starting a subtransaction that would be prohibited
+ in a parallel query context will be prohibited unless the planner
+ believes that this will cause the query to fail. If failures or
+ unexpected results occur when this option is set, some functions used
+ by the query may need to be marked <literal>PARALLEL UNSAFE</literal>
+ (or, possibly, <literal>PARALLEL RESTRICTED</literal>).
+ </para>
+
+ <para>
+ Setting this value to <literal>regress</> has all of the same effects
+ as setting it to <literal>on</> plus some additional effect that are
+ intended to facilitate automated regression testing. Normally,
+ messages from a parallel worker are prefixed with a context line,
+ but a setting of <literal>regress</> suppresses this to guarantee
+ reproducible results. Also, the <literal>Gather</> nodes added to
+ plans by this setting are hidden from the <literal>EXPLAIN</> output
+ so that the output matches what would be obtained if this setting
+ were turned <literal>off</>.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>
</sect1>