On Tue, May 20, 2025 at 5:23 PM Masahiko Sawada <sawada.m...@gmail.com> wrote:
> > On Fri, May 2, 2025 at 11:59 AM Masahiko Sawada <sawada.m...@gmail.com> > wrote: > > > > However, there is a possibility that we have already eagerly scanned > > another page and returned it to the read stream before we freeze the > > eagerly-scanned page and disable the eager scan. In this case, the > > next block that we retrieved from the read stream could also be an > > eagerly-scanned page. > > I've added it to Open Items for v18. > > If I understand correctly, there's a potential scenario where we might > eagerly scan more pages than permitted by the success and failure > caps. One question is: what is the practical magnitude of this excess > scanning? If the overflow could be substantial (for instance, eagerly > scanning 30% of table pages), we should consider revising our eager > scanning mechanism. Thanks for reporting this. Sorry I missed it initially. I need to do some more investigation, but IIUC you are saying that this is an interaction between the read stream and eager scan code? I tried to confirm that was the case by setting io_combine_limit and maintenance_io_concurrency to 1, which should be similar behavior to not using the read stream WRT read combining etc. But, even doing so, your repro tripped the assert. What made you suspect an interaction with the read stream? - Melanie