On Mon, Nov 23, 2020 at 7:12 PM James Coleman <jtc331@gmail.com> wrote:
>
> On Tue, Nov 3, 2020 at 1:48 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > James Coleman <jtc331@gmail.com> writes:
> > > I also noticed that the incremental sort plan posted earlier has
> > > multiple Gather Merge nodes; that's not what I would have expected,
> > > but maybe I'm missing something.
> >
> > Hm. There is only one Gather Merge in the repro case.
>
> I'm able to reproduce having a gather merge underneath each side of a
> merge right join with a related bugfix patch applied (0001 in [1]).
> But I didn't know if this was a big no-no, or if it's just rare, and
> so a bit unexpected, but not necessarily incorrect.
>
I also think such a plan should be fine and shouldn't result in any error.
> What we _don't_
> have is a gather merge underneath a gather merge, which is what I
> think would definitely be incorrect.
>
Right.
--
With Regards,
Amit Kapila.