Maxim Boguk <maxim.boguk@gmail.com> writes:
> Ok there are reproducer test case on the stock postgresql 16.4 config:
Hmm, you can see both behaviors on the small version of t1, just by
varying the comparison constant in the WHERE clause. For me, it'll
use only one worker with "where a<1", and not parallelize at all
with "where a<0". It looks like it's deciding that it's not worth
starting workers when too few rows are expected to be returned. That
would be unsurprising with a normal setting of parallel_setup_cost,
but it does seem odd with parallel_setup_cost=0.
In any case, I think this isn't about the big table being big but
about changing the range of values of "a", which changes the
selectivity of "where a<10" 100-fold.
(I tested on HEAD not v16)
regards, tom lane