From 8ee36126a8f36636bd8bb727d4c2737375a7d539 Mon Sep 17 00:00:00 2001 From: Alena Rybakina Date: Sat, 18 Jul 2026 21:45:41 +0300 Subject: [PATCH v42 1/9] Report per-index removed tuples in vacuum instrumentation. The per-index line of VACUUM VERBOSE and the autovacuum log reported page counts but not how many index entries the vacuum removed, even though the heap-side line has always shown removed tuples. Add the accumulated tuples_removed of the index's bulkdelete passes to the per-index line: index "t_pkey": tuples: 500 removed; pages: 30 in total, ... Suggested by Bharath Rupireddy. --- src/backend/access/heap/vacuumlazy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 39395aed0d5..d6c763baeb9 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -1157,8 +1157,9 @@ heap_vacuum_rel(Relation rel, const VacuumParams *params, continue; appendStringInfo(&buf, - _("index \"%s\": pages: %u in total, %u newly deleted, %u currently deleted, %u reusable\n"), + _("index \"%s\": tuples: %.0f removed; pages: %u in total, %u newly deleted, %u currently deleted, %u reusable\n"), indnames[i], + istat->tuples_removed, istat->num_pages, istat->pages_newly_deleted, istat->pages_deleted, -- 2.39.5 (Apple Git-154)