| From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
|---|---|
| To: | Tomas Vondra <tomas(at)vondra(dot)me> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Lukas Fittl <lukas(at)fittl(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: EXPLAIN: showing ReadStream / prefetch stats |
| Date: | 2026-04-06 14:01:47 |
| Message-ID: | CAAKRu_aiEsBH1Z3L96G1_WDv6Mrd3Zo1SmWia=bEjrbZyJUOUA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Apr 6, 2026 at 5:15 AM Tomas Vondra <tomas(at)vondra(dot)me> wrote:
>
> Anyway, that doesn't matter much, because the more I look at the
> approach with having a separate chunk of shared memory, the more I like
> it. It seems much simpler, more elegant, etc. I really disliked how
> unreadable the code got with the parallel_aware/instrument checks in
> multiple places, and this just gets rid of that. I like that.
>
<--snip-->
>
> Is execParallel.h the right place to define the offset? It means the
> various nodes (like nodeBitmapHeapScan) now have to include this header,
> and it seems a bit suspicious. I can't think of a better .h file, and
> maybe I'm wrong and it's perfectly fine.
It could go in src/include/executor is instrument_node.h. It's where
the structs for the shared instrumentation go. It's probably cheaper
to include also because it doesn't include anything.
> Regarding plan_node_id - I think the offset works fine for now. It
> effectively gives us 2 IDs per node. The only alternative I can think of
> is having nodes "request" how many IDs will be needed - most nodes would
> say "1", nodes with instrumentation would say "2", etc. In the future we
> might get a node that needs 3+ shm chunks. I don't think we need to do
> all that now.
Makes sense to me.
- Melanie
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2026-04-06 14:01:52 | Re: pg_plan_advice |
| Previous Message | Bruce Momjian | 2026-04-06 13:57:49 | Re: PG 19 release notes and authors |