From b3fe098d330ff6a7c23019d66a600072b1d4664d Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Wed, 26 Nov 2025 14:24:27 +0100 Subject: Add GUC to show EXEC_BACKEND state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no straightforward way to determine if a cluster is running in EXEC_BACKEND mode or not, which is useful for tests to know. This adds a GUC debug_exec_backend similar to debug_assertions which will be true when the server is running in EXEC_BACKEND mode. Author: Daniel Gustafsson Reviewed-by: Chao Li Reviewed-by: Álvaro Herrera Reviewed-by: Peter Eisentraut Discussion: https://postgr.es/m/5F301096-921A-427D-8EC1-EBAEC2A35082@yesql.se --- src/backend/utils/misc/guc_tables.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/backend/utils/misc/guc_tables.c') diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 0209b2067a2..f87b558c2c6 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -627,6 +627,13 @@ static bool integer_datetimes; #endif static bool assert_enabled = DEFAULT_ASSERT_ENABLED; +#ifdef EXEC_BACKEND +#define EXEC_BACKEND_ENABLED true +#else +#define EXEC_BACKEND_ENABLED false +#endif +static bool exec_backend_enabled = EXEC_BACKEND_ENABLED; + static char *recovery_target_timeline_string; static char *recovery_target_string; static char *recovery_target_xid_string; -- cgit v1.2.3