Fix problems in commit c16dc1aca5e01e6acaadfcf38f5fc964a381dc62.
authorRobert Haas <rhaas@postgresql.org>
Wed, 16 Mar 2016 17:54:04 +0000 (13:54 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 16 Mar 2016 17:54:04 +0000 (13:54 -0400)
Vinayak Pokale provided a patch for a copy-and-paste error in a
comment.  I noticed that I'd use the word "automatically" nearby where
I meant to talk about things being "atomic".  Rahila Syed spotted a
misplaced counter update.  Fix all that stuff.

src/backend/commands/vacuumlazy.c
src/backend/postmaster/pgstat.c

index 163c121560d20dc47eb7c8f286d2c5ce02ee2785..52e19b30614cda7cf85ae200eff41dc662e3d04c 100644 (file)
@@ -1228,7 +1228,6 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
 
        /* report that everything is scanned and vacuumed */
        pgstat_progress_update_param(PROGRESS_VACUUM_HEAP_BLKS_SCANNED, blkno);
-       pgstat_progress_update_param(PROGRESS_VACUUM_HEAP_BLKS_VACUUMED, blkno);
 
        pfree(frozen);
 
@@ -1287,7 +1286,8 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
                vacrelstats->num_index_scans++;
        }
 
-       /* report we're now in the cleanup phase */
+       /* report all blocks vacuumed; and that we're cleaning up */
+       pgstat_progress_update_param(PROGRESS_VACUUM_HEAP_BLKS_VACUUMED, blkno);
        pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
                                                                 PROGRESS_VACUUM_PHASE_INDEX_CLEANUP);
 
index bfe70fc41dbe687bc025251fc46756a34f9b1157..bed7bb18e61a19ae28407a321c05898918d74fc2 100644 (file)
@@ -2903,7 +2903,7 @@ pgstat_progress_update_param(int index, int64 val)
 }
 
 /*-----------
- * pgstat_progress_update_params() -
+ * pgstat_progress_update_multi_param() -
  *
  * Automatically update multiple members in st_progress_param[] of own backend
  * entry.