Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 98d476a

Browse files
author
Amit Kapila
committed
Improve coding pattern in Parallel Append code.
The create_append_path code didn't consider that list_concat will modify it's first argument leading to inconsistent traversal of resulting list. In practice, it won't lead to any user-visible bug but changing it for making the code behave consistently. Reported-by: Tom Lane Author: Tom Lane Reviewed-by: Amit Khandekar and Amit Kapila Discussion: https://postgr.es/m/32365.1528994120@sss.pgh.pa.us
1 parent c704897 commit 98d476a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/optimizer/util/pathnode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ create_append_path(PlannerInfo *root,
12741274
pathnode->first_partial_path = list_length(subpaths);
12751275
pathnode->subpaths = list_concat(subpaths, partial_subpaths);
12761276

1277-
foreach(l, subpaths)
1277+
foreach(l, pathnode->subpaths)
12781278
{
12791279
Path *subpath = (Path *) lfirst(l);
12801280

0 commit comments

Comments
 (0)