aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-04-13 08:49:59 -0400
committerRobert Haas <rhaas@postgresql.org>2012-04-13 08:51:19 -0400
commit5630eddf1efe7c374fe8e8bdeaba3c70f8cd628b (patch)
tree412d903dc186bc4a0cecf77a4705b79c3182636d
parent81e3e4fd14f82e93edfda8621727040ab3c70840 (diff)
downloadpostgresql-5630eddf1efe7c374fe8e8bdeaba3c70f8cd628b.tar.gz
postgresql-5630eddf1efe7c374fe8e8bdeaba3c70f8cd628b.zip
Update lazy_scan_heap header comment.
The previous comment described how things worked in PostgreSQL 8.2 and prior.
-rw-r--r--src/backend/commands/vacuumlazy.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 11e8da1fc1b..d4f35bc648a 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -342,13 +342,18 @@ vacuum_log_cleanup_info(Relation rel, LVRelStats *vacrelstats)
/*
* lazy_scan_heap() -- scan an open heap relation
*
- * This routine sets commit status bits, builds lists of dead tuples
- * and pages with free space, and calculates statistics on the number
- * of live tuples in the heap. When done, or when we run low on space
- * for dead-tuple TIDs, invoke vacuuming of indexes and heap.
+ * This routine prunes each page in the heap, which will among other
+ * things truncate dead tuples to dead line pointers, defragment the
+ * page, and set commit status bits (see heap_page_prune). It also builds
+ * lists of dead tuples and pages with free space, calculates statistics
+ * on the number of live tuples in the heap, and marks pages as
+ * all-visible if appropriate. When done, or when we run low on space for
+ * dead-tuple TIDs, invoke vacuuming of indexes and call lazy_vacuum_heap
+ * to reclaim dead line pointers.
*
- * If there are no indexes then we just vacuum each dirty page as we
- * process it, since there's no point in gathering many tuples.
+ * If there are no indexes then we can reclaim line pointers on the fly;
+ * dead line pointers need only be retained until all index pointers that
+ * reference them have been killed.
*/
static void
lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,