On Sat, Apr 4, 2026 at 1:33 AM Andres Freund <andres@anarazel.de> wrote:
> static inline bool
> index_scan_batch_loaded(IndexScanDescData *scan, uint8 idx)
> {
> return (int8) (idx - scan->batchringbuf.headBatch) >= 0 &&
> (int8) (idx - scan->batchringbuf.nextBatch) < 0;
> }
>
> once the differences between the values don't fit into an int8 anymore.
The static assertion is incorrect (or not strict enough). It didn't
account for this int8 arithmetic. That'll be fixed in the next
version; the true maximum number of batches is 128 (still more than
anybody is likely to ever need).
> But I'm tired.
Same.
--
Peter Geoghegan