Re: EXPLAIN: showing ReadStream / prefetch stats - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: EXPLAIN: showing ReadStream / prefetch stats
Date
Msg-id CAH2-WzmLGVED5zgs5Sc-VfTFM-d=OdvYEbGyRsShDr5Q8ShW1w@mail.gmail.com
Whole thread
In response to Re: EXPLAIN: showing ReadStream / prefetch stats  (Tomas Vondra <tomas@vondra.me>)
Responses Re: EXPLAIN: showing ReadStream / prefetch stats
List pgsql-hackers
On Tue, Sep 22, 2026 at 11:23 AM Tomas Vondra <tomas@vondra.me> wrote:
> In other words, I/O and buffers may disagree - that's not a bug. Those
> counters are tracking different things.
>
> To handle this correctly, we'd need to find a way to not issue the I/O
> at all (since 862092932c9479b79732f3b441da05453ea5e06d we discard I/O
> that was not initiated yet).

Isn't this what Andres' experimental "Make read_stream_reset()/end()
not wait for IO" patch does? See:

https://www.postgresql.org/message-id/f3xxfrkafjxpyqxywcxricxgyizjirfceychyxsgn7bwjp5eda@kwbduhy7tfmu

This is one of the patches that I've been posting as part of the index
prefetching patch series for some time now.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Teach pg_upgrade to deal with invalid databases
Next
From: Andres Freund
Date:
Subject: Re: EXPLAIN: showing ReadStream / prefetch stats