Re: Gather Merge - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Gather Merge
Date
Msg-id CA+TgmoYAmHV5MKefwj=2Eg5MrS7Nqe5xwBLiVy520DUdRWtBwg@mail.gmail.com
Whole thread Raw
In response to Re: Gather Merge  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Mon, Oct 17, 2016 at 4:56 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> + node->nreaders < 2)
...
> I see there are small discrepancies in both the codes like I don't see
> the use of single_copy flag, as it is present in gather node.

single_copy doesn't make sense for GatherMerge, because the whole
point is to merge a bunch of individually-sorted output streams into a
single stream.  If you have only one stream of tuples, you don't need
to merge anything: you could have just used Gather for that.

It does, however, make sense to merge one worker's output with the
leader's output.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Question about behavior of snapshot too old feature
Next
From: Robert Haas
Date:
Subject: Re: postgres_fdw super user checks