Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query
Date
Msg-id 4002.1534199884@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Could the planner stick a materialize node there that feeds the same set of
> originally selected records to any parallel executors that end up pulling
> from it?

No.  At least, Materialize as it stands doesn't help.  There's no
provision for pushing rowsets to parallel workers, only pulling
from them, and it would be an extremely nontrivial thing to add
AFAICS (for one thing, it'd make the leader process even more of
a bottleneck than it is already).

Maybe you could do something with dumping a rowset into a tuplestore
and forcing that out to temp files on-disk before starting any of
the parallel workers, then letting them read it in from the temp
files.  But that still looks like a lot of new work and completely
not fit for back-patching, even if we had it.

            regards, tom lane


pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query
Next
From: Amit Kapila
Date:
Subject: Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query