Commits on Aug 6, 2026
-
instrumentation: Use Instrumentation struct for parallel workers
This simplifies the DSM allocations a bit since we don't need to separately allocate WAL and buffer usage, and allows the easier future addition of a third stack-based struct being discussed. In passing, adjust InstrAccumParallelQuery to handle multiple workers: All callers currently have a loop to call the accumulation for each worker and a local loop variable defined. To slightly simplify the callers, move the loop into the InstrAccumParallelQuery function and add a new "nworkers" argument to it. Author: Lukas Fittl <lukas@fittl.com> Reviewed-by: Discussion:
-
Unify parallel worker handling for instrumentation
Introduce helpers to estimate the shared memory required for instrumentation, and for allocating and storing it in shared memory. Author: Lukas Fittl <lukas@fittl.com> Reviewed-by: Discussion:
lfittl authored and Commitfest Bot committed
Aug 6, 2026 -
Unify parallel worker handling for query text
Multiple callers (parallel index builds, parallel vacuum, parallel query) all had the same implementation for passing query text to the parallel workers. To reduce duplicated code, introduce new helper functions to: (1) estimate the needed shared memory space for the query text, (2) store the query text in shared memory, and (3) restore the query text in the worker. Author: Lukas Fittl <lukas@fittl.com> Reviewed-by: Discussion:
lfittl authored and Commitfest Bot committed
Aug 6, 2026 -
Unify parallel index build infrastructure
The three in-tree index AMs that currently support parallel index builds (nbtree, gin and brin) each share very similar code for initializing parallel workers, allocating shared memory and communicating between the leader and the workers. To reduce duplication, introduce shared helpers for parallel index builds, unifiying the existing code. This also fixes an oversight in parallel GIN index builds that forgot to pass the queryid to the parallel workers, like other AMs do. Author: Lukas Fittl <lukas@fittl.com> Reviewed-by: Discussion:
lfittl authored and Commitfest Bot committed
Aug 6, 2026