summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
authorPavan Deolasee2017-08-28 10:03:47 +0000
committerPavan Deolasee2017-08-28 11:07:51 +0000
commitdbd9556cef9bf426bfd5e396f532d94a16860659 (patch)
tree5e4e8c0eb6ca6ac781c174604e0d05417df751c6 /src/backend/optimizer
parent8e1fc9914c83e5cd4ba4799fe6b4fee7dcb619bb (diff)
Do not add any distribution to a dummy append node
A dummy append node with no subpaths doesn't need any adjustment for distribution. This allows us to actually correct handle UPDATE/DELETE in some cases which were failing earlier.
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/plan/planner.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index ee6c50d7c0..cc4b06a292 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6918,6 +6918,9 @@ adjust_path_distribution(PlannerInfo *root, Query *parse, Path *path)
if ((path->distribution == NULL) && (root->distribution == NULL))
return path;
+ if (IS_DUMMY_PATH(path))
+ return path;
+
if (equal_distributions(root, root->distribution, path->distribution))
{
if (IsLocatorReplicated(path->distribution->distributionType) &&