From 8559e5fe2e7697d96c86d5c00ab54b789bbc6c8c Mon Sep 17 00:00:00 2001 From: Anthonin Bonnefoy Date: Thu, 23 May 2024 09:24:04 +0200 Subject: Remove unnecessary assignment of path rows in gather merge The number of rows of a gather merge node is set inside cost_gather_merge, making the assignment in create_gather_merge_path unnecessary and slightly misleading. This patch removes the unnecessary assignment from create_gather_merge_path, mirroring what's done in create_gather_path. --- src/backend/optimizer/util/pathnode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index c42742d2c7..d1c4e1a6aa 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -1899,7 +1899,6 @@ create_gather_merge_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, pathnode->num_workers = subpath->parallel_workers; pathnode->path.pathkeys = pathkeys; pathnode->path.pathtarget = target ? target : rel->reltarget; - pathnode->path.rows += subpath->rows; if (pathkeys_contained_in(pathkeys, subpath->pathkeys)) { -- 2.39.3 (Apple Git-146)