On Tue, Oct 28, 2025 at 08:36:33AM +0800, Chao Li wrote: > On Oct 28, 2025, at 07:35, Michael Paquier <[email protected]> wrote: >> On Mon, Oct 27, 2025 at 09:55:38AM -0500, Nathan Bossart wrote: >>> /* >>> * DISABLE_LEADER_PARTICIPATION disables the leader's participation in >>> * parallel index builds. This may be useful as a debugging aid. >>> -#undef DISABLE_LEADER_PARTICIPATION >>> + *#undef DISABLE_LEADER_PARTICIPATION >>> */ >>> >>> IMHO we should either remove this line or move it out of the comment. >>> AFAICT we ordinarily don't #undef debugging stuff like this, presumably so >>> you can change it with compile flags. >> >> I would put this one on a separate line, outside the comment. It's >> minor, still we use this style in pg_config_manual.h. See around >> REALLOCATE_BITMAPSETS. > > +1
Here's a patch for this. I also changed the #undefs to #defines. -- nathan
>From bf5e0e7ac895070ccb3b3cff9a550e4c14179e2b Mon Sep 17 00:00:00 2001 From: Nathan Bossart <[email protected]> Date: Thu, 11 Dec 2025 15:26:57 -0600 Subject: [PATCH v1 1/1] fix some commented undefs --- src/backend/access/nbtree/nbtsort.c | 2 +- src/backend/utils/adt/numeric.c | 2 +- src/include/executor/execdebug.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index d7695dc1108..5119db53a1b 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -69,8 +69,8 @@ /* * DISABLE_LEADER_PARTICIPATION disables the leader's participation in * parallel index builds. This may be useful as a debugging aid. -#undef DISABLE_LEADER_PARTICIPATION */ +/* #define DISABLE_LEADER_PARTICIPATION */ /* * Status record for spooling/sorting phase. (Note we may have two of diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 2460698df01..a42a2948121 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -48,8 +48,8 @@ * Uncomment the following to enable compilation of dump_numeric() * and dump_var() and to get a dump of any result produced by make_result(). * ---------- -#define NUMERIC_DEBUG */ +/* #define NUMERIC_DEBUG */ /* ---------- diff --git a/src/include/executor/execdebug.h b/src/include/executor/execdebug.h index e5d27fb6c9a..d999a907e77 100644 --- a/src/include/executor/execdebug.h +++ b/src/include/executor/execdebug.h @@ -34,22 +34,22 @@ * EXEC_NESTLOOPDEBUG is a flag which turns on debugging of the * nest loop node by NL_printf() and ENL_printf() in nodeNestloop.c * ---------------- -#undef EXEC_NESTLOOPDEBUG */ +/* #define EXEC_NESTLOOPDEBUG */ /* ---------------- * EXEC_SORTDEBUG is a flag which turns on debugging of * the ExecSort() stuff by SO_printf() in nodeSort.c * ---------------- -#undef EXEC_SORTDEBUG */ +/* #define EXEC_SORTDEBUG */ /* ---------------- * EXEC_MERGEJOINDEBUG is a flag which turns on debugging of * the ExecMergeJoin() stuff by MJ_printf() in nodeMergejoin.c * ---------------- -#undef EXEC_MERGEJOINDEBUG */ +/* #define EXEC_MERGEJOINDEBUG */ /* ---------------------------------------------------------------- * #defines controlled by above definitions -- 2.39.5 (Apple Git-154)
