@@ -115,7 +115,7 @@ static bool made_tablespace_dirs = false;
115115static bool found_tablespace_dirs = false;
116116
117117/* Progress counters */
118- static uint64 totalsize ;
118+ static uint64 totalsize_kb ;
119119static uint64 totaldone ;
120120static int tablespacecount ;
121121
@@ -722,7 +722,7 @@ progress_report(int tablespacenum, const char *filename, bool force)
722722 return ; /* Max once per second */
723723
724724 last_progress_report = now ;
725- percent = totalsize ? (int ) ((totaldone / 1024 ) * 100 / totalsize ) : 0 ;
725+ percent = totalsize_kb ? (int ) ((totaldone / 1024 ) * 100 / totalsize_kb ) : 0 ;
726726
727727 /*
728728 * Avoid overflowing past 100% or the full size. This may make the total
@@ -732,8 +732,8 @@ progress_report(int tablespacenum, const char *filename, bool force)
732732 */
733733 if (percent > 100 )
734734 percent = 100 ;
735- if (totaldone / 1024 > totalsize )
736- totalsize = totaldone / 1024 ;
735+ if (totaldone / 1024 > totalsize_kb )
736+ totalsize_kb = totaldone / 1024 ;
737737
738738 /*
739739 * Separate step to keep platform-dependent format code out of
@@ -742,7 +742,7 @@ progress_report(int tablespacenum, const char *filename, bool force)
742742 */
743743 snprintf (totaldone_str , sizeof (totaldone_str ), INT64_FORMAT ,
744744 totaldone / 1024 );
745- snprintf (totalsize_str , sizeof (totalsize_str ), INT64_FORMAT , totalsize );
745+ snprintf (totalsize_str , sizeof (totalsize_str ), INT64_FORMAT , totalsize_kb );
746746
747747#define VERBOSE_FILENAME_LENGTH 35
748748 if (verbose )
@@ -1942,11 +1942,11 @@ BaseBackup(void)
19421942 /*
19431943 * Sum up the total size, for progress reporting
19441944 */
1945- totalsize = totaldone = 0 ;
1945+ totalsize_kb = totaldone = 0 ;
19461946 tablespacecount = PQntuples (res );
19471947 for (i = 0 ; i < PQntuples (res ); i ++ )
19481948 {
1949- totalsize += atol (PQgetvalue (res , i , 2 ));
1949+ totalsize_kb += atol (PQgetvalue (res , i , 2 ));
19501950
19511951 /*
19521952 * Verify tablespace directories are empty. Don't bother with the
0 commit comments