On Fri, Oct 9, 2026 at 9:16 PM John Naylor <[email protected]> wrote: > I'm interested in the ideas in this thread, but I'm thinking I'll wait > to see how the amgetbatch effort shakes out first.
FWIW I don't think that amgetbatch changes the picture in a way that affects this patch. This technique *should* be orthogonal. The changes we're making to btgetbitmap are limited to making it use AM-generic versions of the current nbtree-private BTScanPosData and BTScanPosItem structs. Although btgetbitmap reuses batch infrastructure internally, to enable code sharing with lower level scan code shared with btgetbatch, it still works in a way that requires only one batch for the scan's duration, which is palloc'd exactly once. In short, we're making as few changes as possible to btgetbitmap and its performance characteristics; unlike plain scans, bitmap scans have nothing to gain from batching. -- Peter Geoghegan
