Re: [PATCH] Add memory/disk usage for Function Scan nodes in EXPLAIN - Mailing list pgsql-hackers

From David Rowley
Subject Re: [PATCH] Add memory/disk usage for Function Scan nodes in EXPLAIN
Date
Msg-id CAApHDvpbGg1uH6SqmyjtJO8f_rT1pj903sVjGmEG_ReKmAtLNA@mail.gmail.com
Whole thread
In response to Re: [PATCH] Add memory/disk usage for Function Scan nodes in EXPLAIN  (Tatsuya Kawata <kawatatatsuya0913@gmail.com>)
Responses Re: [PATCH] Add memory/disk usage for Function Scan nodes in EXPLAIN
List pgsql-hackers
On Tue, 6 Oct 2026 at 03:09, Tatsuya Kawata <kawatatatsuya0913@gmail.com> wrote:
> > 1. I'm confused by the following in explain.sql.  We don't support
> > parallel function scans, so the comments and setting of
> > max_parallel_workers_per_gather seem bogus:
>
> Function Scan isn't parallel-aware, but generate_series() is parallel
> safe, so with debug_parallel_query = regress the whole plan runs in a
> parallel worker.  EXPLAIN only reads the storage information from the
> leader's tuplestore, so the Storage line doesn't appear in that case.
>
> Indeed, when I removed the setting and ran make check with
> debug_parallel_query = regress, the Storage line disappeared from all
> three of the new tests and the explain test failed.
>
> So I kept the setting and rewrote the comment to make the reason
> clearer.

That doesn't seem great. On checking, I see Material has the same
issue, but that's not been highlighted by the buildfarm members
running debug_parallel_query = regress due to lack of EXPLAIN ANALYZE
test that has a Material node. I've just posted a patch to fix that in
[1]. Can you follow that code and resolve this issue in your patch?

David

[1] https://postgr.es/m/CAApHDvoUWCms-b27MpDKd5_RUFtAnVrxPgN9u3QoQbBihk+S6g@mail.gmail.com



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Material node doesn't show "Maximum Storage" for parallel workers
Next
From: Tom Lane
Date:
Subject: Re: [PG19] eager aggregation gives wrong results because of bpchar_ops