Re: [HACKERS] Foreign Join pushdowns not working properly for outerjoins - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: [HACKERS] Foreign Join pushdowns not working properly for outerjoins
Date
Msg-id 770319a3-b6b7-f7e1-95f3-51a405c24a8c@lab.ntt.co.jp
Whole thread Raw
In response to [HACKERS] Foreign Join pushdowns not working properly for outer joins  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] dropping partitioned tables without CASCADE
Next
From: Rafia Sabih
Date:
Subject: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!