| From: | David Rowley <drowley(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Accumulate Memoize parallel worker stats across rescans |
| Date: | 2026-10-14 09:07:15 |
| Message-ID: | E1xGux9-00000001ZQu-1Lfa@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Accumulate Memoize parallel worker stats across rescans
When a Gather or Gather Merge node is rescanned, it starts a new set of
workers, which write their Memoize stats into the same shared memory
slots as the previous worker. ExecEndMemoize() used memcpy() for this,
so EXPLAIN ANALYZE showed only the stats for the final scan.
Here we adjust ExecEndMemoize() to accumulate the counters so that we
gather up the totals over all rescans.
Author: Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)com>
Reviewed-by: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHza6qeA-4vB355co-2yAxDMRTpEneY0rg9CD2zMLYscYvv2UA@mail.gmail.com
Backpatch-through: 14
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8b9ffcb11061c47c1071d8e5e4825e76fc333afe
Modified Files
--------------
src/backend/executor/nodeMemoize.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2026-10-14 09:07:44 | pgsql: Accumulate Memoize parallel worker stats across rescans |
| Previous Message | Michael Paquier | 2026-10-14 07:41:23 | pgsql: Reuse the zstd context when compressing WAL full-page images |