v2-0001-Remove-unnecessary-assignment-of-path-rows-in-gat.patch
application/octet-stream
Filename: v2-0001-Remove-unnecessary-assignment-of-path-rows-in-gat.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v2-0001
Subject: Remove unnecessary assignment of path rows in gather merge
| File | + | − |
|---|---|---|
| src/backend/optimizer/util/pathnode.c | 0 | 1 |
From 2206c1cde09778aa589691d2a16696ee13140619 Mon Sep 17 00:00:00 2001
From: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
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)