Re: Foreign join pushdown vs EvalPlanQual

Поиск
Список
Период
Сортировка
От Etsuro Fujita
Тема Re: Foreign join pushdown vs EvalPlanQual
Дата
Msg-id 55E7D912.30501@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Foreign join pushdown vs EvalPlanQual  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Foreign join pushdown vs EvalPlanQual  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Re: Foreign join pushdown vs EvalPlanQual  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2015/09/03 9:41, Robert Haas wrote:
> That having been said, I don't entirely like Fujita-san's patch
> either.  Much of the new code is called immediately adjacent to an FDW
> callback which could pretty trivially do the same thing itself, if
> needed.

Another idea about that code is to call that code in eg, ExecProcNode, 
instead of calling ExecForeignScan there.  I think that that might be 
much cleaner and resolve the naming problem below.

> And much of it is contingent on whether estate->es_epqTuple
> != NULL and scanrelid == 0, but perhaps out would be better to check
> whether the subplan is actually present instead of checking whether we
> think it should be present.

Agreed with this.

> Also, the naming is a bit weird:
> node->fs_subplan gets shoved into outerPlanState(), which seems like a
> kludge.

And with this.  Proposals welcome.

> I'm wondering if there's another approach.  If I understand correctly,
> there are two reasons why the current situation is untenable.  The
> first is that ForeignRecheck always returns true, but we could instead
> call an FDW-supplied callback routine there.  The callback could be
> optional, so that we just return true if there is none, which is nice
> for already-existing FDWs that then don't need to do anything.

My question about this is, is the callback really needed?  If there are 
any FDWs that want to do the work *in their own way*, instead of just 
doing ExecProcNode for executing a local join execution plan in case of 
foreign join (or just doing ExecQual for checking remote quals in case 
of foreign table), I'd agree with introducing the callback, but if not, 
I don't think that that makes much sense.

Best regards,
Etsuro Fujita




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore
Следующее
От: Pavan Deolasee
Дата:
Сообщение: Re: Horizontal scalability/sharding