From c95f78e6a9b0e29fe195fb1cad34309eb5f5a8b3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 16 Aug 2022 15:54:19 -0500
Subject: [PATCH 21/26] avoid shadow vars: costsize.c: subpath

commit 959d00e9dbe4cfcf4a63bb655ac2c29a5e579246
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   Fri Apr 5 19:20:30 2019 -0400

    Use Append rather than MergeAppend for scanning ordered partitions.
---
 src/backend/optimizer/path/costsize.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 1e94c5aa7c4..504b13da7be 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -2545,10 +2545,10 @@ cost_append(AppendPath *apath, PlannerInfo *root)
 			/* Compute rows and costs as sums of subplan rows and costs. */
 			foreach(l, apath->subpaths)
 			{
-				Path	   *subpath = (Path *) lfirst(l);
+				Path	   *sub = (Path *) lfirst(l);
 
-				apath->path.rows += subpath->rows;
-				apath->path.total_cost += subpath->total_cost;
+				apath->path.rows += sub->rows;
+				apath->path.total_cost += sub->total_cost;
 			}
 		}
 		else
-- 
2.17.1

