Get info from metapage to determine cost

This commit is contained in:
Andrew Kane
2023-09-03 12:31:01 -07:00
parent 4571fccc60
commit b1f9519689
5 changed files with 26 additions and 23 deletions

View File

@@ -182,27 +182,6 @@ GetScanItems(IndexScanDesc scan, Datum value)
tuplesort_performsort(so->sortstate);
}
/*
* Get the metapage info
*/
static void
IvfflatGetMetaPageInfo(Relation index, int *lists, int *dimensions)
{
Buffer buf;
Page page;
IvfflatMetaPage metap;
buf = ReadBuffer(index, IVFFLAT_METAPAGE_BLKNO);
LockBuffer(buf, BUFFER_LOCK_SHARE);
page = BufferGetPage(buf);
metap = IvfflatPageGetMeta(page);
*lists = metap->lists;
*dimensions = metap->dimensions;
UnlockReleaseBuffer(buf);
}
/*
* Prepare for an index scan
*/