Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Дата
Msg-id CAFjFpReGq13cCKTsB4xacHnFANuDGyvz=dBTuv1C1dYsjNATvA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Ответы Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Список pgsql-hackers




* Is it safe to replace outerjoinpath with its fdw_outerpath the following way?  I think that if the join relation represented by outerjoinpath has local conditions that can't be executed remotely, we have to keep outerjoinpath in the path tree; we will otherwise fail to execute the local conditions.  No?

+                       /*
+                        * If either inner or outer path is a ForeignPath corresponding to
+                        * a pushed down join, replace it with the fdw_outerpath, so that we
+                        * maintain path for EPQ checks built entirely of local join
+                        * strategies.
+                        */
+                       if (IsA(joinpath->outerjoinpath, ForeignPath))
+                       {
+                               ForeignPath *foreign_path;
+                               foreign_path = (ForeignPath *)joinpath->outerjoinpath;
+                               if (foreign_path->path.parent->reloptkind == RELOPT_JOINREL)
+                                       joinpath->outerjoinpath = foreign_path->fdw_outerpath;
+                       }


all the conditions (local and remote) should be part of fdw_outerpath as well, since that's the alternate local path, which should produce (when converted to the plan) the same result as the foreign path. fdw_outerpath should be a local path set when paths for outerjoinpath->parent was being created. Am I missing something?

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: WIP: Detecting SSI conflicts before reporting constraint violations
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Incorrect formula for SysV IPC parameters