Restored previous behavior and added comment

This commit is contained in:
Andrew Kane
2023-03-12 13:57:40 -07:00
parent dbfc6a35d9
commit 42da2b334b

View File

@@ -146,8 +146,10 @@ ivfflatvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
if (info->analyze_only)
return stats;
/* stats is NULL if ambulkdelete not called */
/* OK to return NULL if index not changed */
if (stats == NULL)
stats = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult));
return NULL;
stats->num_pages = RelationGetNumberOfBlocks(rel);