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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy