Remove obsolete IndexBulkDeleteResult stats field.

The pages_removed field is no longer used for anything.  It hasn't been
possible for an index to physically shrink since old-style VACUUM FULL
was removed by commit 0a469c87.
This commit is contained in:
Peter Geoghegan 2021-02-11 16:49:41 -08:00
parent 62535cae97
commit 3063eb1759
2 changed files with 4 additions and 9 deletions

View File

@ -546,9 +546,6 @@ gistvacuum_delete_empty_pages(IndexVacuumInfo *info, GistVacState *vstate)
ReleaseBuffer(buffer); ReleaseBuffer(buffer);
/* update stats */
vstate->stats->pages_removed += deleted;
/* /*
* We can stop the scan as soon as we have seen the downlinks, even if * We can stop the scan as soon as we have seen the downlinks, even if
* we were not able to remove them all. * we were not able to remove them all.

View File

@ -63,16 +63,14 @@ typedef struct IndexVacuumInfo
* of which this is just the first field; this provides a way for ambulkdelete * of which this is just the first field; this provides a way for ambulkdelete
* to communicate additional private data to amvacuumcleanup. * to communicate additional private data to amvacuumcleanup.
* *
* Note: pages_removed is the amount by which the index physically shrank, * Note: pages_deleted and pages_free refer to free space within the index
* if any (ie the change in its total size on disk). pages_deleted and * file. Some index AMs may compute num_index_tuples by reference to
* pages_free refer to free space within the index file. Some index AMs * num_heap_tuples, in which case they should copy the estimated_count field
* may compute num_index_tuples by reference to num_heap_tuples, in which * from IndexVacuumInfo.
* case they should copy the estimated_count field from IndexVacuumInfo.
*/ */
typedef struct IndexBulkDeleteResult typedef struct IndexBulkDeleteResult
{ {
BlockNumber num_pages; /* pages remaining in index */ BlockNumber num_pages; /* pages remaining in index */
BlockNumber pages_removed; /* # removed during vacuum operation */
bool estimated_count; /* num_index_tuples is an estimate */ bool estimated_count; /* num_index_tuples is an estimate */
double num_index_tuples; /* tuples remaining */ double num_index_tuples; /* tuples remaining */
double tuples_removed; /* # removed during vacuum operation */ double tuples_removed; /* # removed during vacuum operation */