remove unused GUC options - strict_statement_checking and enforce_two_phase_commit
authorTomas Vondra <[email protected]>
Mon, 22 Aug 2016 22:05:24 +0000 (00:05 +0200)
committerPavan Deolasee <[email protected]>
Wed, 24 Aug 2016 09:18:08 +0000 (14:48 +0530)
These two options were ineffective - defined and listed in the sample
configuration file, but attached to unreferenced variables.

src/backend/pgxc/plan/planner.c
src/backend/pgxc/pool/execRemote.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/pgxc/execRemote.h
src/include/pgxc/planner.h

index 0212c8773673d3961c1de79b3d4e09f09b240ef9..d00d7b8ffad88fb5434a7d4a24d1cc2e0d6fbb8c 100644 (file)
@@ -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);
index 91c105d1200e859fa60df45de04207aed6567eb5..c756c1ae6458150ae04907b1ed3f50c8a67de588 100644 (file)
@@ -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
index be9171d371253fb43b9b027ff7d6d1c2ad3e2d94..d02d3c8d37f266584016d2f5a405216842ccf2a4 100644 (file)
@@ -1728,25 +1728,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."),
index 43483caf7d61e1868249f22843323abd4c48b36d..57d074577efd3ccc295273ec442574848dada2db 100644 (file)
 
 #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
index d8c1d6fa1cda779ffeb1102b200d6408a3f57c97..4cbcbec4ad7057d61e1aaaba7a0f509298006def 100644 (file)
@@ -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
index f6357cd71155555da0c01d23b9328621987c4c5b..62c07c821b9a411458b185a50d85bf1e038efec1 100644 (file)
@@ -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);