From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, 花田茂 <shigeru(dot)hanada(at)gmail(dot)com> |
Subject: | Re: Foreign join pushdown vs EvalPlanQual |
Date: | 2015-09-10 21:02:23 |
Message-ID: | CA+TgmoaAzs0dR23R7PTBseQfwOtuVCPNBqDHxeBo9Gi+dMxj8w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 3, 2015 at 6:25 AM, Etsuro Fujita
<fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> I gave it another thought; the following changes to ExecInitNode would make
> the patch much simpler, ie, we would no longer need to call the new code in
> ExecInitForeignScan, ExecForeignScan, ExecEndForeignScan, and
> ExecReScanForeignScan. I think that would resolve the name problem also.
>
> *** a/src/backend/executor/execProcnode.c
> --- b/src/backend/executor/execProcnode.c
> ***************
> *** 247,254 **** ExecInitNode(Plan *node, EState *estate, int eflags)
> break;
>
> case T_ForeignScan:
> ! result = (PlanState *) ExecInitForeignScan((ForeignScan *) node,
> ! estate, eflags);
> break;
>
> case T_CustomScan:
> --- 247,269 ----
> break;
>
> case T_ForeignScan:
> ! {
> ! Index scanrelid = ((ForeignScan *)
> node)->scan.scanrelid;
> !
> ! if (estate->es_epqTuple != NULL && scanrelid == 0)
> ! {
> ! /*
> ! * We are in foreign join inside an EvalPlanQual
> recheck.
> ! * Initialize local join execution plan, instead.
> ! */
> ! Plan *subplan = ((ForeignScan *)
> node)->fs_subplan;
> !
> ! result = ExecInitNode(subplan, estate, eflags);
> ! }
> ! else
> ! result = (PlanState *) ExecInitForeignScan((ForeignScan
> *) node,
> ! estate,
> eflags);
> ! }
> break;
I don't think that's a good idea. The Plan tree and the PlanState
tree should be mirror images of each other; breaking that equivalence
will cause confusion, at least.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-09-10 21:24:00 | Re: Foreign join pushdown vs EvalPlanQual |
Previous Message | Robert Haas | 2015-09-10 20:48:49 | RLS open items are vague and unactionable |