> Last but not least, I realized that parallel BIS needs parallel > instrumentation support for EXPLAIN ANALYZE. I'll work on that next and > provide an updated patch the next days. It turned out that this is not the case and parallel instrumentation for BIS seems to be all there already. I got on the wrong track because e.g. Parallel Index (Only) Scan and many other plan nodes estimate in two parts:
1. memory needed for parallel-aware execution state and 2. memory needed for instrumentation when under a Gather node. This is also needed when the plan is ran by a parallel worker but the node itself not parallal-aware. For example IndexOnlyScanState: if (planstate->plan->parallel_aware) ExecIndexOnlyScanEstimate((IndexOnlyScanState *)ps, e->pcxt); /* even when not parallel-aware, for EXPLAIN ANALYZE */ ExecIndexOnlyScanInstrumentEstimate((IndexOnlyScanState *)ps, e->pcxt); While for parallel BIS/BHS scan we do: ExecBitmapHeapInstrumentEstimate((BitmapHeapScanState *)ps, e->pcxt); and ExecBitmapIndexScanEstimate((BitmapIndexScanState *)ps, e->pcxt); It turned out that the BIS / BHS functions do both inside a single function, while other nodes have two functions for it. I think it would be good to make this consistent across all nodes. This would include renaming the functions that don't allocate any execution state but only instrumentation state, e.g. rename ExecAggEstimate() -> ExecAggInstrumentEstimate(). Obviously, as a separate patch. -- David Geier
