diff options
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 3ba3f87eb7c..9ed73da0f79 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -901,7 +901,8 @@ set_append_rel_size(PlannerInfo *root, RelOptInfo *rel, * store the relids of all partitions which could possibly contain a * matching tuple, and skip anything else in the loop below. */ - if (rte->relkind == RELKIND_PARTITIONED_TABLE && + if (enable_partition_pruning && + rte->relkind == RELKIND_PARTITIONED_TABLE && rel->baserestrictinfo != NIL) { live_children = prune_append_rel_partitions(rel); |