Re: Don't synchronously wait for already-in-progress IO in read stream

2025-11-09 Thread Thomas Munro
On Fri, Sep 12, 2025 at 9:46 AM Andres Freund wrote: + * It's possible that another backend starts IO on the buffer between this + * check and the ReadBuffersCanStartIO(nowait = false) below. In that case + * we will synchronously wait for the IO below, but the window for that is +

Re: Don't synchronously wait for already-in-progress IO in read stream

2025-11-09 Thread Peter Geoghegan
On Thu, Sep 11, 2025 at 5:46 PM Andres Freund wrote: > The problem leading to that is that we are currently synchronously waiting for > IO on a buffer when AsyncReadBuffers() encounters a buffer already undergoing > IO. If a block is read twice, that means we won't actually have enough IOs in > fl

Don't synchronously wait for already-in-progress IO in read stream

2025-09-11 Thread Andres Freund
Hi, In the index prefetching thread we discovered that read stream performance suffers rather substantially when a read stream is reading blocks multiple times within the readahead distance. The problem leading to that is that we are currently synchronously waiting for IO on a buffer when AsyncRe