Re: RFC: Allow EXPLAIN to Output Page Fault Information - Mailing list pgsql-hackers

From Atsushi Torikoshi
Subject Re: RFC: Allow EXPLAIN to Output Page Fault Information
Date
Msg-id CAM6-o=BL59LgruKXm3DCjzFzvr7TTJPtryEPj51YeGMFrWO0EQ@mail.gmail.com
Whole thread
In response to Re: RFC: Allow EXPLAIN to Output Page Fault Information  (Jelte Fennema-Nio <postgres@jeltef.nl>)
List pgsql-hackers
On Sun, May 24, 2026 at 6:50 PM Jelte Fennema-Nio <postgres@jeltef.nl> wrote:
>
> On Fri, 22 May 2026 at 18:07, Atsushi Torikoshi
> <torikoshia.tech@gmail.com> wrote:
> > Updated the patch to clarify that the reported values include not only
> > the backend process executing the query, but also any parallel query
> > worker processes involved in the query.
>
> For PG19 Tomas added an IO option to EXPLAIN. I think it would be
> better to have the Storage IO tracking be enabled by the IO option,
> rather than the BUFFERS option.

Thank you for pointing that out.
I agree that having this under the IO option seems more intuitive.

One thing I am slightly concerned about, though, is that according to
the documentation, the IO option reports only I/O performed by scan
nodes:

> Include information on I/O performed by scan nodes providing such information.

In contrast, the information produced by this patch is based on
getrusage(), so it includes all Storage I/O performed by the backend
and parallel workers, not just scan nodes.
For example, it would also include temporary file I/O generated by
operations such as sorts that spill to disk when they exceed work_mem.

I suppose this could be clarified in the documentation, but I would be
interested to hear if anyone has concerns or objections about that
approach.

--
Regards,
Atsushi Torikoshi



pgsql-hackers by date:

Previous
From: Chengpeng Yan
Date:
Subject: Re: Is there value in having optimizer stats for joins/foreignkeys?
Next
From: Daniel Gustafsson
Date:
Subject: Re: Tighten SCRAM iteration parsing and bound libpq PBKDF2 work