Improved vacuumcleanup stats

This commit is contained in:
Andrew Kane
2023-03-12 13:34:26 -07:00
parent bbae64b784
commit dbfc6a35d9

View File

@@ -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);