Hi,
While hacking on something I happened to notice a couple asserts on
ParallelWorkerNumber when collecting shared instrumentation:
Assert(ParallelWorkerNumber <= node->shared_info->num_workers);
This is not quire right, because num_workers is used to size arrays
indexed by ParallelWorkerNumber. And the comment in parallel.c also
claims (ParallelWorkerNumber < num_workers).
So AFAICS the assert(s) should be
Assert(ParallelWorkerNumber < node->shared_info->num_workers);
I don't think we had issues with this not catching a bug. But it may be
a bit misleading, so worth fixing and (probably) backpatching.
regards
--
Tomas Vondra