Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3fe098

Browse files
Add GUC to show EXEC_BACKEND state
There is no straightforward way to determine if a cluster is runningin EXEC_BACKEND mode or not, which is useful for tests to know. Thisadds a GUC debug_exec_backend similar to debug_assertions which willbe 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
1 parent0f4f457 commitb3fe098

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

‎doc/src/sgml/config.sgml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11833,6 +11833,23 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
1183311833
</listitem>
1183411834
</varlistentry>
1183511835

11836+
<varlistentry id="guc-debug-exec-backend" xreflabel="debug_exec_backend">
11837+
<term><varname>debug_exec_backend</varname> (<type>boolean</type>)
11838+
<indexterm>
11839+
<primary><varname>debug_exec_backend</varname> configuration parameter</primary>
11840+
</indexterm>
11841+
</term>
11842+
<listitem>
11843+
<para>
11844+
Reports whether <productname>PostgreSQL</productname> has been built
11845+
with <literal>EXEC_BACKEND</literal> enabled. That is the case on
11846+
<systemitem class="osname">Windows</systemitem> or if the
11847+
macro <symbol>EXEC_BACKEND</symbol> is defined
11848+
when <productname>PostgreSQL</productname> is built.
11849+
</para>
11850+
</listitem>
11851+
</varlistentry>
11852+
1183611853
<varlistentry id="guc-huge-pages-status" xreflabel="huge_pages_status">
1183711854
<term><varname>huge_pages_status</varname> (<type>enum</type>)
1183811855
<indexterm>

‎src/backend/utils/misc/guc_parameters.dat‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,13 @@
617617
max => 'MAX_DEBUG_DISCARD_CACHES',
618618
},
619619

620+
{ name => 'debug_exec_backend', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
621+
short_desc => 'Shows whether the running server is built with EXEC_BACKEND enabled.',
622+
flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
623+
variable => 'exec_backend_enabled',
624+
boot_val => 'EXEC_BACKEND_ENABLED',
625+
},
626+
620627
{ name => 'debug_io_direct', type => 'string', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
621628
short_desc => 'Use direct I/O for file access.',
622629
long_desc => 'An empty string disables direct I/O.',

‎src/backend/utils/misc/guc_tables.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,13 @@ static bool integer_datetimes;
627627
#endif
628628
staticboolassert_enabled=DEFAULT_ASSERT_ENABLED;
629629

630+
#ifdefEXEC_BACKEND
631+
#defineEXEC_BACKEND_ENABLED true
632+
#else
633+
#defineEXEC_BACKEND_ENABLED false
634+
#endif
635+
staticboolexec_backend_enabled=EXEC_BACKEND_ENABLED;
636+
630637
staticchar*recovery_target_timeline_string;
631638
staticchar*recovery_target_string;
632639
staticchar*recovery_target_xid_string;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp