mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
Add GUC to show EXEC_BACKEND state
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 <daniel@yesql.se> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/5F301096-921A-427D-8EC1-EBAEC2A35082@yesql.se
This commit is contained in:
@@ -617,6 +617,13 @@
|
||||
max => 'MAX_DEBUG_DISCARD_CACHES',
|
||||
},
|
||||
|
||||
{ name => 'debug_exec_backend', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
|
||||
short_desc => 'Shows whether the running server is built with EXEC_BACKEND enabled.',
|
||||
flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
|
||||
variable => 'exec_backend_enabled',
|
||||
boot_val => 'EXEC_BACKEND_ENABLED',
|
||||
},
|
||||
|
||||
{ name => 'debug_io_direct', type => 'string', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
|
||||
short_desc => 'Use direct I/O for file access.',
|
||||
long_desc => 'An empty string disables direct I/O.',
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user