Re: Should we add GUCs to allow partition pruning to be disabled? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Should we add GUCs to allow partition pruning to be disabled?
Date
Msg-id 20180420182829.w622atg4fkk7khcl@alvherre.pgsql
Whole thread Raw
In response to Re: Should we add GUCs to allow partition pruning to be disabled?  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Should we add GUCs to allow partition pruning to be disabled?  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index fa92ce2e68..c51a9270e4 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -951,6 +951,15 @@ static struct config_bool ConfigureNamesBool[] =
         true,
         NULL, NULL, NULL
     },
+    {
+        {"enable_partition_pruning", PGC_USERSET, QUERY_TUNING_METHOD,
+            gettext_noop("Enables the planner's ability to remove non-required partitions from the query plan."),
+            NULL
+        },
+        &enable_partition_pruning,
+        true,
+        NULL, NULL, NULL
+    },

I would make the short description shorter, and use the long description
to elaborate.  So gettext_noop("Enable plan-time and run-time partition
pruning.")
followed by something like

gettext_noop("Allows the query planner and executor to compare partition
bounds to conditions in the query, and determine which partitions {can be
skipped | must be scanned} ...")

(Not wedded to those particular phrasings.)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Should we add GUCs to allow partition pruning to be disabled?
Next
From: Alexander Kuzmenkov
Date:
Subject: Re: Reopen logfile on SIGHUP