Convert node test compile-time settings into run-time parameters
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| .cirrus.tasks.yml | modified | +2 −1 |
| doc/src/sgml/config.sgml | modified | +71 −0 |
| src/backend/nodes/read.c | modified | +6 −6 |
| src/backend/nodes/readfuncs.c | modified | +2 −2 |
| src/backend/nodes/README | modified | +5 −4 |
| src/backend/parser/analyze.c | modified | +24 −20 |
| src/backend/tcop/postgres.c | modified | +18 −12 |
| src/backend/utils/misc/guc_tables.c | modified | +59 −0 |
| src/include/nodes/nodes.h | modified | +1 −1 |
| src/include/nodes/readfuncs.h | modified | +1 −1 |
| src/include/pg_config_manual.h | modified | +17 −17 |
| src/include/utils/guc.h | modified | +6 −0 |
Documentation touched
Discussion
- Convert node test compile-time settings into run-time parameters 9 messages · 2024-05-20 → 2024-07-25