From dbfc6a35d9947922903dd20ef0ca943a17a5c199 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 12 Mar 2023 13:34:26 -0700 Subject: [PATCH] Improved vacuumcleanup stats --- src/ivfvacuum.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ivfvacuum.c b/src/ivfvacuum.c index 4441c0d..62cbe75 100644 --- a/src/ivfvacuum.c +++ b/src/ivfvacuum.c @@ -143,8 +143,11 @@ ivfflatvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats) { Relation rel = info->index; + if (info->analyze_only) + return stats; + if (stats == NULL) - return NULL; + stats = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult)); stats->num_pages = RelationGetNumberOfBlocks(rel);