mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Convert node test compile-time settings into run-time parameters
This converts COPY_PARSE_PLAN_TREES WRITE_READ_PARSE_PLAN_TREES RAW_EXPRESSION_COVERAGE_TEST into run-time parameters debug_copy_parse_plan_trees debug_write_read_parse_plan_trees debug_raw_expression_coverage_test They can be activated for tests using PG_TEST_INITDB_EXTRA_OPTS. The compile-time symbols are kept for build farm compatibility, but they now just determine the default value of the run-time settings. Furthermore, support for these settings is not compiled in at all unless assertions are enabled, or the new symbol DEBUG_NODE_TESTS_ENABLED is defined at compile time, or any of the legacy compile-time setting symbols are defined. So there is no run-time overhead in production builds. (This is similar to the handling of DISCARD_CACHES_ENABLED.) Discussion: https://www.postgresql.org/message-id/flat/30747bd8-f51e-4e0c-a310-a6e2c37ec8aa%40eisentraut.org
This commit is contained in:
@ -11425,6 +11425,29 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-debug-copy-parse-plan-trees" xreflabel="debug_copy_parse_plan_trees">
|
||||
<term><varname>debug_copy_parse_plan_trees</varname> (<type>boolean</type>)
|
||||
<indexterm>
|
||||
<primary><varname>debug_copy_parse_plan_trees</varname> configuration parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enabling this forces all parse and plan trees to be passed through
|
||||
<function>copyObject()</function>, to facilitate catching errors and
|
||||
omissions in <function>copyObject()</function>. The default is off.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This parameter is only available when
|
||||
<symbol>DEBUG_NODE_TESTS_ENABLED</symbol> was defined at compile time
|
||||
(which happens automatically when using the
|
||||
<application>configure</application> option
|
||||
<option>--enable-cassert</option>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-debug-discard-caches" xreflabel="debug_discard_caches">
|
||||
<term><varname>debug_discard_caches</varname> (<type>integer</type>)
|
||||
<indexterm>
|
||||
@ -11540,6 +11563,54 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-debug-raw-expression-coverage-test" xreflabel="debug_raw_expression_coverage_test">
|
||||
<term><varname>debug_raw_expression_coverage_test</varname> (<type>boolean</type>)
|
||||
<indexterm>
|
||||
<primary><varname>debug_raw_expression_coverage_test</varname> configuration parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enabling this forces all raw parse trees for DML statements to be
|
||||
scanned by <function>raw_expression_tree_walker()</function>, to
|
||||
facilitate catching errors and omissions in that function. The
|
||||
default is off.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This parameter is only available when
|
||||
<symbol>DEBUG_NODE_TESTS_ENABLED</symbol> was defined at compile time
|
||||
(which happens automatically when using the
|
||||
<application>configure</application> option
|
||||
<option>--enable-cassert</option>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-debug-write-read-parse-plan-trees" xreflabel="debug_write_read_parse_plan_trees">
|
||||
<term><varname>debug_write_read_parse_plan_trees</varname> (<type>boolean</type>)
|
||||
<indexterm>
|
||||
<primary><varname>debug_write_read_parse_plan_trees</varname> configuration parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enabling this forces all parse and plan trees to be passed through
|
||||
<filename>outfuncs.c</filename>/<filename>readfuncs.c</filename>, to
|
||||
facilitate catching errors and omissions in those modules. The
|
||||
default is off.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This parameter is only available when
|
||||
<symbol>DEBUG_NODE_TESTS_ENABLED</symbol> was defined at compile time
|
||||
(which happens automatically when using the
|
||||
<application>configure</application> option
|
||||
<option>--enable-cassert</option>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-ignore-system-indexes" xreflabel="ignore_system_indexes">
|
||||
<term><varname>ignore_system_indexes</varname> (<type>boolean</type>)
|
||||
<indexterm>
|
||||
|
Reference in New Issue
Block a user