@@ -207,11 +207,24 @@ progress_report(int tablespacenum, char *fn)
207207percent = 100 ;
208208
209209if (verbose )
210- fprintf (stderr ,
211- INT64_FORMAT "/" INT64_FORMAT " kB (%i%%) %i/%i tablespaces (%-30s)\r" ,
212- totaldone /1024 ,totalsize ,
213- percent ,
214- tablespacenum ,tablespacecount ,fn );
210+ {
211+ if (!fn )
212+
213+ /*
214+ * No filename given, so clear the status line (used for last
215+ * call)
216+ */
217+ fprintf (stderr ,
218+ INT64_FORMAT "/" INT64_FORMAT " kB (100%%) %i/%i tablespaces %35s\r" ,
219+ totaldone /1024 ,totalsize ,
220+ tablespacenum ,tablespacecount ,"" );
221+ else
222+ fprintf (stderr ,
223+ INT64_FORMAT "/" INT64_FORMAT " kB (%i%%) %i/%i tablespaces (%-30.30s)\r" ,
224+ totaldone /1024 ,totalsize ,
225+ percent ,
226+ tablespacenum ,tablespacecount ,fn );
227+ }
215228else
216229fprintf (stderr ,INT64_FORMAT "/" INT64_FORMAT " kB (%i%%) %i/%i tablespaces\r" ,
217230totaldone /1024 ,totalsize ,
@@ -871,7 +884,7 @@ BaseBackup()
871884
872885if (showprogress )
873886{
874- progress_report (PQntuples (res ),"" );
887+ progress_report (PQntuples (res ),NULL );
875888fprintf (stderr ,"\n" );/* Need to move to next line */
876889}
877890PQclear (res );