From ce729535c47d72db775ebcf1f185799c78615148 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 16 Aug 2022 15:55:13 -0500
Subject: [PATCH 02/26] avoid shadow vars: pg_dump.c: tbinfo

backpatch to v15

commit 9895961529ef8ff3fc12b39229f9a93e08bca7b7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   Mon Dec 6 13:07:31 2021 -0500

    Avoid per-object queries in performance-critical paths in pg_dump.
---
 src/bin/pg_dump/pg_dump.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 322947c5609..5c196d66985 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -7080,21 +7080,21 @@ getConstraints(Archive *fout, TableInfo tblinfo[], int numTables)
 	appendPQExpBufferChar(tbloids, '{');
 	for (int i = 0; i < numTables; i++)
 	{
-		TableInfo  *tbinfo = &tblinfo[i];
+		TableInfo  *mytbinfo = &tblinfo[i];
 
 		/*
 		 * For partitioned tables, foreign keys have no triggers so they must
 		 * be included anyway in case some foreign keys are defined.
 		 */
-		if ((!tbinfo->hastriggers &&
-			 tbinfo->relkind != RELKIND_PARTITIONED_TABLE) ||
-			!(tbinfo->dobj.dump & DUMP_COMPONENT_DEFINITION))
+		if ((!mytbinfo->hastriggers &&
+			 mytbinfo->relkind != RELKIND_PARTITIONED_TABLE) ||
+			!(mytbinfo->dobj.dump & DUMP_COMPONENT_DEFINITION))
 			continue;
 
 		/* OK, we need info for this table */
 		if (tbloids->len > 1)	/* do we have more than the '{'? */
 			appendPQExpBufferChar(tbloids, ',');
-		appendPQExpBuffer(tbloids, "%u", tbinfo->dobj.catId.oid);
+		appendPQExpBuffer(tbloids, "%u", mytbinfo->dobj.catId.oid);
 	}
 	appendPQExpBufferChar(tbloids, '}');
 
-- 
2.17.1

