diff --git a/src/bin/gs_guc/cluster_guc.conf b/src/bin/gs_guc/cluster_guc.conf index 15cc60662..b4104d93b 100755 --- a/src/bin/gs_guc/cluster_guc.conf +++ b/src/bin/gs_guc/cluster_guc.conf @@ -572,6 +572,7 @@ ustore_attr|string|0,0|NULL|NULL| enable_ustore|bool|0,0|NULL|Enable to create ustore table| enable_default_ustore_table|bool|0,0|NULL|Enable to create ustore table by default| enable_gtt_concurrent_truncate|bool|0,0|NULL|Enable concurrent truncate table for GTT| +foreign_key_checks|bool|0,0|NULL|Enable foreign key check on insert, update or drop operation,only applicable to b-format db.| reserve_space_for_nullable_atts|bool|0,0|NULL|Enable reserve space for nullable attributes, only applicable to ustore| undo_space_limit_size|int|819200,17179869184|kB|Maximum physical space of the undo command| undo_limit_size_per_transaction|int|2048,17179869184|kB|Maximum space for allocating undo resources in a transaction| diff --git a/src/common/backend/utils/misc/guc.cpp b/src/common/backend/utils/misc/guc.cpp index 740472a1f..601840f94 100755 --- a/src/common/backend/utils/misc/guc.cpp +++ b/src/common/backend/utils/misc/guc.cpp @@ -2117,6 +2117,20 @@ static void InitConfigureNamesBool() NULL, NULL }, + {{"foreign_key_checks", + PGC_USERSET, + NODE_ALL, + QUERY_TUNING, + gettext_noop("Enable foreign key check on insert, update or drop operation," + "only applicable to b-format db." + ), + NULL}, + &u_sess->attr.attr_common.foreign_key_checks, + true, + NULL, + NULL, + NULL + }, /* End-of-list marker */ {{NULL, (GucContext)0, diff --git a/src/include/knl/knl_guc/knl_session_attr_common.h b/src/include/knl/knl_guc/knl_session_attr_common.h index d34b1593f..2e3a523e7 100644 --- a/src/include/knl/knl_guc/knl_session_attr_common.h +++ b/src/include/knl/knl_guc/knl_session_attr_common.h @@ -250,6 +250,7 @@ typedef struct knl_session_attr_common { bool b_compatibility_user_host_auth; int time_record_level; bool enable_record_nettime; + bool foreign_key_checks; } knl_session_attr_common; #endif /* SRC_INCLUDE_KNL_KNL_SESSION_ATTR_COMMON_H_ */