Re: EXPLAIN: showing ReadStream / prefetch stats

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Nikolay Samokhvalov <nik(at)postgres(dot)ai>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: EXPLAIN: showing ReadStream / prefetch stats
Date: 2026-09-22 15:38:14
Message-ID: 462zvzr4m5a2q3xtfwz35ehpzgpan5pjcgul7wkmnouobujcbg@at3ezkpvwt4w
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-09-22 11:35:29 -0400, Peter Geoghegan wrote:
> On Tue, Sep 22, 2026 at 11:23 AM Tomas Vondra <tomas(at)vondra(dot)me> wrote:
> > In other words, I/O and buffers may disagree - that's not a bug. Those
> > counters are tracking different things.

+1

> > 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.

They're still issued in that patch, we just don't wait for them anymore. But I
think even so, they should still be accounted for.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sagar Shedge 2026-09-22 15:40:10 Re: postgres_fdw: push down FETCH FIRST .. WITH TIES when server version allows
Previous Message Peter Geoghegan 2026-09-22 15:35:29 Re: EXPLAIN: showing ReadStream / prefetch stats