summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/path')
-rw-r--r--src/backend/optimizer/path/allpaths.c2
-rw-r--r--src/backend/optimizer/path/pathkeys.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 671117314a..296dd75c1b 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -1689,7 +1689,7 @@ generate_orderedappend_paths(PlannerInfo *root, RelOptInfo *rel,
* for both forward and reverse scans.
*/
if (rel->part_scheme != NULL && IS_SIMPLE_REL(rel) &&
- partitions_are_ordered(rel->boundinfo, rel->nparts))
+ partitions_are_ordered(rel->boundinfo, rel->live_parts))
{
partition_pathkeys = build_partition_pathkeys(root, rel,
ForwardScanDirection,
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index bd9a176d7d..216dd26385 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -704,7 +704,7 @@ build_partition_pathkeys(PlannerInfo *root, RelOptInfo *partrel,
int i;
Assert(partscheme != NULL);
- Assert(partitions_are_ordered(partrel->boundinfo, partrel->nparts));
+ Assert(partitions_are_ordered(partrel->boundinfo, partrel->live_parts));
/* For now, we can only cope with baserels */
Assert(IS_SIMPLE_REL(partrel));