Skip to content

Commit 7c8ad31

Browse files
committed
etstes
1 parent 20a8f78 commit 7c8ad31

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/backend/optimizer/path/costsize.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,6 @@ cost_tidrangescan(Path *path, PlannerInfo *root,
14611461
enable_mask |= PGS_CONSIDER_NONPARTIAL;
14621462
path->disabled_nodes =
14631463
(baserel->pgs_mask & enable_mask) != enable_mask ? 1 : 0;
1464-
path->disabled_nodes = 0;
14651464
path->startup_cost = startup_cost;
14661465
path->total_cost = startup_cost + cpu_run_cost + disk_run_cost;
14671466
}

src/backend/optimizer/plan/createplan.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6526,8 +6526,11 @@ materialize_finished_plan(Plan *subplan)
65266526
subplan->startup_cost -= initplan_cost;
65276527
subplan->total_cost -= initplan_cost;
65286528

6529-
/* Set cost data */
6529+
/* Clear fields that cost_material() will consult */
6530+
matpath.parallel_workers = 0;
65306531
matpath.parent = NULL;
6532+
6533+
/* Set cost data */
65316534
cost_material(&matpath,
65326535
enable_material,
65336536
subplan->disabled_nodes,

src/backend/optimizer/util/pathnode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3971,10 +3971,10 @@ reparameterize_path(PlannerInfo *root, Path *path,
39713971
spath = reparameterize_path(root, spath,
39723972
required_outer,
39733973
loop_count);
3974-
enabled =
3975-
(mpath->path.disabled_nodes <= spath->disabled_nodes);
39763974
if (spath == NULL)
39773975
return NULL;
3976+
enabled =
3977+
(mpath->path.disabled_nodes <= spath->disabled_nodes);
39783978
return (Path *) create_material_path(rel, spath, enabled);
39793979
}
39803980
case T_Memoize:

0 commit comments

Comments
 (0)