From a1c1323ca209e7de7198066843d854cbc9fab127 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 17 Aug 2022 00:05:30 -0500
Subject: [PATCH 26/26] avoid shadow vars: basebackup.c: ti

commit 3866ff6149a3b072561e65b3f71f63498e77b6b2
Author: Magnus Hagander <magnus@hagander.net>
Date:   Sat Jan 15 19:18:14 2011 +0100

    Enumerate available tablespaces after starting the backup
---
 src/backend/backup/basebackup.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 715428029b3..b3367dccf74 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -306,9 +306,9 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
 		/* Send off our tablespaces one by one */
 		foreach(lc, state.tablespaces)
 		{
-			tablespaceinfo *ti = (tablespaceinfo *) lfirst(lc);
+			tablespaceinfo *thisti = (tablespaceinfo *) lfirst(lc);
 
-			if (ti->path == NULL)
+			if (thisti->path == NULL)
 			{
 				struct stat statbuf;
 				bool		sendtblspclinks = true;
@@ -342,11 +342,11 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
 			}
 			else
 			{
-				char	   *archive_name = psprintf("%s.tar", ti->oid);
+				char	   *archive_name = psprintf("%s.tar", thisti->oid);
 
 				bbsink_begin_archive(sink, archive_name);
 
-				sendTablespace(sink, ti->path, ti->oid, false, &manifest);
+				sendTablespace(sink, thisti->path, thisti->oid, false, &manifest);
 			}
 
 			/*
@@ -355,7 +355,7 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
 			 * include the xlog files below and stop afterwards. This is safe
 			 * since the main data directory is always sent *last*.
 			 */
-			if (opt->includewal && ti->path == NULL)
+			if (opt->includewal && thisti->path == NULL)
 			{
 				Assert(lnext(state.tablespaces, lc) == NULL);
 			}
-- 
2.17.1

