Home Explore Blog CI



postgresql

82th chunk of `doc/src/sgml/config.sgml`
e98eabc28368f0d1234b612e283c6323fa819dcbf6429e3d0000000100000fa3
 server command
        line.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="guc-max-parallel-apply-workers-per-subscription" xreflabel="max_parallel_apply_workers_per_subscription">
      <term><varname>max_parallel_apply_workers_per_subscription</varname> (<type>integer</type>)
      <indexterm>
       <primary><varname>max_parallel_apply_workers_per_subscription</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Maximum number of parallel apply workers per subscription. This
        parameter controls the amount of parallelism for streaming of
        in-progress transactions with subscription parameter
        <literal>streaming = parallel</literal>.
       </para>
       <para>
        The parallel apply workers are taken from the pool defined by
        <varname>max_logical_replication_workers</varname>.
       </para>
       <para>
        The default value is 2. This parameter can only be set in the
        <filename>postgresql.conf</filename> file or on the server command
        line.
       </para>
      </listitem>
     </varlistentry>

     </variablelist>
    </sect2>

   </sect1>

   <sect1 id="runtime-config-query">
    <title>Query Planning</title>

    <sect2 id="runtime-config-query-enable">
     <title>Planner Method Configuration</title>

      <para>
       These configuration parameters provide a crude method of
       influencing the query plans chosen by the query optimizer. If
       the default plan chosen by the optimizer for a particular query
       is not optimal, a <emphasis>temporary</emphasis> solution is to use one
       of these configuration parameters to force the optimizer to
       choose a different plan.
       Better ways to improve the quality of the
       plans chosen by the optimizer include adjusting the planner cost
       constants (see <xref linkend="runtime-config-query-constants"/>),
       running <link linkend="sql-analyze"><command>ANALYZE</command></link> manually, increasing
       the value of the <xref
       linkend="guc-default-statistics-target"/> configuration parameter,
       and increasing the amount of statistics collected for
       specific columns using <command>ALTER TABLE SET
       STATISTICS</command>.
      </para>

     <variablelist>
     <varlistentry id="guc-enable-async-append" xreflabel="enable_async_append">
      <term><varname>enable_async_append</varname> (<type>boolean</type>)
      <indexterm>
       <primary><varname>enable_async_append</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Enables or disables the query planner's use of async-aware
        append plan types. The default is <literal>on</literal>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="guc-enable-bitmapscan" xreflabel="enable_bitmapscan">
      <term><varname>enable_bitmapscan</varname> (<type>boolean</type>)
      <indexterm>
       <primary>bitmap scan</primary>
      </indexterm>
      <indexterm>
       <primary><varname>enable_bitmapscan</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Enables or disables the query planner's use of bitmap-scan plan
        types. The default is <literal>on</literal>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="guc-enable-distinct-reordering" xreflabel="enable_distinct_reordering">
      <term><varname>enable_distinct_reordering</varname> (<type>boolean</type>)
      <indexterm>
       <primary><varname>enable_distinct_reordering</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Enables or disables the query planner's ability to reorder DISTINCT
        keys to match the input path's pathkeys. The default is <literal>on</literal>.
       </para>
      </listitem>
     </varlistentry>

Title: Query Planning Configuration: Planner Method Configuration
Summary
This section discusses configuration parameters that influence the query plans chosen by the query optimizer. It suggests that these parameters should be used as temporary solutions when the default plan is not optimal. Better solutions include adjusting planner cost constants, running ANALYZE, increasing the default statistics target, and increasing statistics collected for specific columns. Parameters discussed include `enable_async_append` to enable/disable async-aware append plan types, `enable_bitmapscan` to enable/disable bitmap-scan plan types, and `enable_distinct_reordering` to enable/disable reordering DISTINCT keys.