@@ -342,13 +342,18 @@ vacuum_log_cleanup_info(Relation rel, LVRelStats *vacrelstats)
342
342
/*
343
343
*lazy_scan_heap() -- scan an open heap relation
344
344
*
345
- *This routine sets commit status bits, builds lists of dead tuples
346
- *and pages with free space, and calculates statistics on the number
347
- *of live tuples in the heap. When done, or when we run low on space
348
- *for dead-tuple TIDs, invoke vacuuming of indexes and heap.
345
+ *This routine prunes each page in the heap, which will among other
346
+ *things truncate dead tuples to dead line pointers, defragment the
347
+ *page, and set commit status bits (see heap_page_prune). It also builds
348
+ *lists of dead tuples and pages with free space, calculates statistics
349
+ *on the number of live tuples in the heap, and marks pages as
350
+ *all-visible if appropriate. When done, or when we run low on space for
351
+ *dead-tuple TIDs, invoke vacuuming of indexes and call lazy_vacuum_heap
352
+ *to reclaim dead line pointers.
349
353
*
350
- *If there are no indexes then we just vacuum each dirty page as we
351
- *process it, since there's no point in gathering many tuples.
354
+ *If there are no indexes then we can reclaim line pointers on the fly;
355
+ *dead line pointers need only be retained until all index pointers that
356
+ *reference them have been killed.
352
357
*/
353
358
static void
354
359
lazy_scan_heap (Relation onerel ,LVRelStats * vacrelstats ,