MCPcopy Create free account
hub / github.com/apache/cloudberry / set_debug_options

Function set_debug_options

src/backend/tcop/postgres.c:4556–4582  ·  view source on GitHub ↗

* set_debug_options --- apply "-d N" command line option * * -d is not quite the same as setting log_min_messages because it enables * other output options. */

Source from the content-addressed store, hash-verified

4554 * other output options.
4555 */
4556void
4557set_debug_options(int debug_flag, GucContext context, GucSource source)
4558{
4559 if (debug_flag > 0)
4560 {
4561 char debugstr[64];
4562
4563 sprintf(debugstr, "debug%d", debug_flag);
4564 SetConfigOption("log_min_messages", debugstr, context, source);
4565 }
4566 else
4567 SetConfigOption("log_min_messages", "notice", context, source);
4568
4569 if (debug_flag >= 1 && context == PGC_POSTMASTER)
4570 {
4571 SetConfigOption("log_connections", "true", context, source);
4572 SetConfigOption("log_disconnections", "true", context, source);
4573 }
4574 if (debug_flag >= 2)
4575 SetConfigOption("log_statement", "all", context, source);
4576 if (debug_flag >= 3)
4577 SetConfigOption("debug_print_parse", "true", context, source);
4578 if (debug_flag >= 4)
4579 SetConfigOption("debug_print_plan", "true", context, source);
4580 if (debug_flag >= 5)
4581 SetConfigOption("debug_print_rewritten", "true", context, source);
4582}
4583
4584
4585bool

Callers 2

PostmasterMainFunction · 0.85

Calls 1

SetConfigOptionFunction · 0.85

Tested by

no test coverage detected