Re: PassDownLimitBound for ForeignScan/CustomScan

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>
Cc: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: PassDownLimitBound for ForeignScan/CustomScan
Date: 2016-09-15 15:38:52
Message-ID: CA+TgmoZePc5Tnj975G5WZR=JruVGnagiWJDyaTOUVztduDZRLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 13, 2016 at 9:07 PM, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> wrote:
> In the current implementation calls recompute_limits() on the first
> invocation of ExecLimit and ExecReScanLimit. Do we expect the
> ps->numTuples will be also passed down to the child nodes on the same
> timing?

Sure, unless we find some reason why that's not good.

> I also think this new executor contract shall be considered as a hint
> (but not a requirement) for the child nodes, because it allows the
> parent nodes to re-distribute the upper limit regardless of the type
> of the child nodes as long as the parent node can work correctly and
> has benefit even if the child node returns a part of tuples. It makes
> the decision whether the upper limit should be passed down much simple.
> The child node "can" ignore the hint but can utilize for more optimization.

+1.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Ignatov 2016-09-15 15:45:12 Parallel sec scan in plpgsql
Previous Message Alvaro Herrera 2016-09-15 15:38:35 Re: OpenSSL 1.1 breaks configure and more