On 2017/03/06 11:05, David Rowley wrote:
> I've been asked to investigate a case of a foreign join not occurring
> on the foreign server as would have been expected.
> The attached patch, based on 9.6, fixes the problem by properly
> processing the foreign server options in
> postgresGetForeignJoinPaths().
>
> I ended up shifting the code which does this into functions to allow
> it to be reused. I also ended up shifting out the code which processes
> the table options so that it is consistent.
>
> Reviews from people a bit closer to the foreign join pushdown code are welcome.
Thanks for working on this!
I think the fix would work well, but another way I think is much simpler
and more consistent with the existing code is to (1) move code for
getting the server info from the outer's fpinfo before calling
is_foreign_expr() in foreign_join_ok() and (2) add code for getting the
shippable extensions info from the outer's fpinfo before calling that
function, like the attached.
Best regards,
Etsuro Fujita
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers