>> It seems it should be not too much additional work to allow one worker
>> to scan an index serially, and then publish it for repartitioning.
> 
> Indeed. Will do.

That made me think what the best way of integrating the repartitioning
step would be: for a parallel BIS doing it as part of the BIS plan node
is still somewhat reasonable but for serial BIS it becomes awkward
because the BIS plan node is serially scanning the index but then
repartitioning in parallel.

How about introducing a new plan node "Parallel Bitmap Partition" which
could look like this in the EXPLAIN output:

Serial scan (e.g. for GIN index, parallel consumption:

-> Bitmap Heap Scan
    -> Bitmap And
        -> Parallel Bitmap Partition
            -> Bitmap Index Scan (executed by single process)
        -> Parallel Bitmap Partition
            -> Bitmap Index Scan (executed by single process)

Parallel scan (for B-tree), parallel consumption:

-> Bitmap Heap Scan
    -> Bitmap And
        -> Parallel Bitmap Partition
            -> Parallel Bitmap Index Scan
        -> Parallel Bitmap Partition
            -> Parallel Bitmap Index Scan

BHS and Bitmap And/Or would never be parallel because also in the
parallel case they just process their local partition.

--
David Geier


Reply via email to