Re: Convert node test compile-time settings into run-time parameters - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Convert node test compile-time settings into run-time parameters
Date
Msg-id CAEudQApPPaafjo3WVnRde-hXz_XKy=GWUztdo2cCf6trKU+83A@mail.gmail.com
Whole thread Raw
In response to Re: Convert node test compile-time settings into run-time parameters  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
Em ter., 21 de mai. de 2024 às 09:25, Peter Eisentraut <peter@eisentraut.org> escreveu:
On 20.05.24 15:59, Tom Lane wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
>> This patch converts the compile-time settings
>>       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
>
> I'm kind of down on this.  It seems like forcing a bunch of
> useless-in-production debug support into the standard build.
> What of this would be of any use to any non-developer?

We have a bunch of other debug_* settings that are available in
production builds, such as

debug_print_parse
debug_print_rewritten
debug_print_plan
debug_pretty_print
debug_discard_caches
debug_io_direct
debug_parallel_query
debug_logical_replication_streaming
If some of this is useful for non-developer users, 
it shouldn't be called debug, or in this category.


Maybe we could hide all of them behind some #ifdef DEBUG_OPTIONS, but in
any case, I don't think the ones being proposed here are substantially
different from those existing ones that they would require a separate
treatment.

My goal is to make these facilities easier to use, avoiding hand-editing
pg_config_manual.h and having to recompile.
Although there are some developer users.
I believe that anything that is not useful for common users and is not used for production
should not be compiled at runtime.

best regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Convert node test compile-time settings into run-time parameters
Next
From: Robert Haas
Date:
Subject: Re: libpq compression (part 3)