This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 5fd9b123ea3f457588e059f7cf49ee771fb5a3f7
Author: Jinbao Chen <[email protected]>
AuthorDate: Wed Dec 31 00:15:17 2025 +0800

    Add fault injector set_variable_fault and reset_variable_fault
---
 src/backend/utils/misc/guc_funcs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/backend/utils/misc/guc_funcs.c 
b/src/backend/utils/misc/guc_funcs.c
index 3d36fdefd64..c8ac34f1e9e 100644
--- a/src/backend/utils/misc/guc_funcs.c
+++ b/src/backend/utils/misc/guc_funcs.c
@@ -30,6 +30,7 @@
 #include "utils/acl.h"
 #include "utils/backend_status.h"
 #include "utils/builtins.h"
+#include "utils/faultinjector.h"
 #include "utils/guc_tables.h"
 #include "utils/snapmgr.h"
 
@@ -63,6 +64,9 @@ ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel)
                        if (stmt->is_local &&
                                Gp_role != GP_ROLE_EXECUTE && 
!IsBootstrapProcessingMode())
                                WarnNoTransactionBlock(isTopLevel, "SET LOCAL");
+
+                       SIMPLE_FAULT_INJECTOR("set_variable_fault");
+
                        (void) set_config_option(stmt->name,
                                                                         
ExtractSetVariableArgs(stmt),
                                                                         
(superuser() ? PGC_SUSET : PGC_USERSET),
@@ -147,6 +151,7 @@ ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel)
                                WarnNoTransactionBlock(isTopLevel, "SET LOCAL");
                        /* fall through */
                case VAR_RESET:
+                       SIMPLE_FAULT_INJECTOR("reset_variable_fault");
                        (void) set_config_option(stmt->name,
                                                                         NULL,
                                                                         
(superuser() ? PGC_SUSET : PGC_USERSET),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to