From: Tomas Vondra Date: Mon, 22 Aug 2016 22:05:24 +0000 (+0200) Subject: remove unused GUC options - strict_statement_checking and enforce_two_phase_commit X-Git-Tag: XL_10_R1BETA1~601 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=9df5e2d7a06a790efbc6e6fcb98f74b8e8ae33b2;p=postgres-xl.git remove unused GUC options - strict_statement_checking and enforce_two_phase_commit These two options were ineffective - defined and listed in the sample configuration file, but attached to unreferenced variables. --- diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c index 0212c87736..d00d7b8ffa 100644 --- a/src/backend/pgxc/plan/planner.c +++ b/src/backend/pgxc/plan/planner.c @@ -61,8 +61,6 @@ #include "utils/timestamp.h" #include "utils/date.h" -/* Forbid unsafe SQL statements */ -bool StrictStatementChecking = true; static bool contains_temp_tables(List *rtable); static PlannedStmt *pgxc_FQS_planner(Query *query, ParamListInfo boundParams); diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c index 380626bea4..4656176591 100644 --- a/src/backend/pgxc/pool/execRemote.c +++ b/src/backend/pgxc/pool/execRemote.c @@ -57,8 +57,6 @@ #include "parser/parsetree.h" #include "pgxc/xc_maintenance_mode.h" -/* Enforce the use of two-phase commit when temporary objects are used */ -bool EnforceTwoPhaseCommit = true; /* * We do not want it too long, when query is terminating abnormally we just * want to read in already available data, if datanode connection will reach a diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 9c9571f54a..d2022d24e6 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1726,25 +1726,6 @@ static struct config_bool ConfigureNamesBool[] = false, check_persistent_connections, NULL, NULL }, - { - {"strict_statement_checking", PGC_USERSET, DEVELOPER_OPTIONS, - gettext_noop("Forbid statements that are not safe for the cluster"), - NULL - }, - &StrictStatementChecking, - true, - NULL, NULL, NULL - }, - { - {"enforce_two_phase_commit", PGC_SUSET, XC_HOUSEKEEPING_OPTIONS, - gettext_noop("Enforce the use of two-phase commit on transactions that" - "made use of temporary objects"), - NULL - }, - &EnforceTwoPhaseCommit, - true, - NULL, NULL, NULL - }, { {"xc_maintenance_mode", PGC_SUSET, XC_HOUSEKEEPING_OPTIONS, gettext_noop("Turn on XC maintenance mode."), diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index adcb200ca7..1de0a847d8 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -645,16 +645,6 @@ #gtm_backup_barrier = off # Specify to backup gtm restart point for each barrier. -##------------------------------------------------------------------------------ -# OTHER PG-XC OPTIONS -#------------------------------------------------------------------------------ -#strict_statement_checking = on # Forbid PG-XC-unsafe SQL - # Enabling is useful for development -#enforce_two_phase_commit = on # Enforce the usage of two-phase commit on transactions - # where temporary objects are used or ON COMMIT actions - # are pending. - # Usage of commit instead of two-phase commit may break - # data consistency so use at your own risk. #------------------------------------------------------------------------------ # CONFIG FILE INCLUDES diff --git a/src/include/pgxc/execRemote.h b/src/include/pgxc/execRemote.h index d8c1d6fa1c..4cbcbec4ad 100644 --- a/src/include/pgxc/execRemote.h +++ b/src/include/pgxc/execRemote.h @@ -32,9 +32,6 @@ #include "tcop/pquery.h" #include "utils/snapshot.h" -/* GUC parameters */ -extern bool EnforceTwoPhaseCommit; - /* Outputs of handle_response() */ #define RESPONSE_EOF EOF #define RESPONSE_COMPLETE 0 diff --git a/src/include/pgxc/planner.h b/src/include/pgxc/planner.h index f6357cd711..62c07c821b 100644 --- a/src/include/pgxc/planner.h +++ b/src/include/pgxc/planner.h @@ -207,9 +207,6 @@ typedef enum SS_UPDATES_DISTRIBUTION_COLUMN /* query updates distribution column */ } ShippabilityStat; -/* forbid SQL if unsafe, useful to turn off for development */ -extern bool StrictStatementChecking; - extern bool pgxc_shippability_walker(Node *node, Shippability_context *sc_context); extern bool pgxc_test_shippability_reason(Shippability_context *context, ShippabilityStat reason);