Improved batch size flexibility [skip ci]

This commit is contained in:
Andrew Kane
2026-06-10 12:10:20 -07:00
parent 98a7f94608
commit 91717c81b3

View File

@@ -332,11 +332,15 @@ hnswgetbatch(IndexScanDesc scan, IndexScanBatch priorbatch, ScanDirection dir)
batch->items[nitems].indexOffset = -1;
batch->items[nitems].tupleOffset = 0;
nitems++;
/* Keep batch size flexible */
if (nitems == scan->maxitemsbatch)
break;
}
/* Needed for strict iterative scans */
if (nitems == 0)
break;
continue;
MemoryContextSwitchTo(oldCtx);