Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-26 Thread David Rowley
On 27 April 2017 at 01:31, Peter Eisentraut wrote: > committed Great. Thanks! -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-26 Thread Peter Eisentraut
On 4/26/17 04:32, David Rowley wrote: >> For backpatching to 9.6, I came up with the attached reduced version. >> Since we don't have add_foreign_grouping_paths() in 9.6, we can omit the >> refactoring and keep the changes much simpler. Does that make sense? > > That makes sense to me. It fixes

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-26 Thread David Rowley
On 26 April 2017 at 02:12, Peter Eisentraut wrote: > On 4/24/17 22:50, Peter Eisentraut wrote: >> On 4/14/17 00:24, Ashutosh Bapat wrote: >>> This looks better. Here are patches for master and 9.6. >>> Since join pushdown was supported in 9.6 the patch should be

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-25 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 7:42 PM, Peter Eisentraut wrote: > On 4/24/17 22:50, Peter Eisentraut wrote: >> On 4/14/17 00:24, Ashutosh Bapat wrote: >>> This looks better. Here are patches for master and 9.6. >>> Since join pushdown was supported in 9.6 the patch

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-25 Thread Peter Eisentraut
On 4/24/17 22:50, Peter Eisentraut wrote: > On 4/14/17 00:24, Ashutosh Bapat wrote: >> This looks better. Here are patches for master and 9.6. >> Since join pushdown was supported in 9.6 the patch should be >> backported to 9.6 as well. Attached is the patch (_96) for 9.6, >> created by rebasing

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-24 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 8:20 AM, Peter Eisentraut wrote: > On 4/14/17 00:24, Ashutosh Bapat wrote: >> This looks better. Here are patches for master and 9.6. >> Since join pushdown was supported in 9.6 the patch should be >> backported to 9.6 as well. Attached is

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-24 Thread Peter Eisentraut
On 4/14/17 00:24, Ashutosh Bapat wrote: > This looks better. Here are patches for master and 9.6. > Since join pushdown was supported in 9.6 the patch should be > backported to 9.6 as well. Attached is the patch (_96) for 9.6, > created by rebasing on 9.6 branch and removing conflict. _v6 is >

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-13 Thread Ashutosh Bapat
On Thu, Apr 13, 2017 at 7:35 AM, David Rowley wrote: > On 13 April 2017 at 11:22, Peter Eisentraut > wrote: >> Is this patch considered ready for review as a backpatch candidate? > > Yes, however, the v5 patch is based on master.

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-12 Thread David Rowley
On 13 April 2017 at 11:22, Peter Eisentraut wrote: > Is this patch considered ready for review as a backpatch candidate? Yes, however, the v5 patch is based on master. The v4 patch should apply to 9.6. Diffing the two patches I see another tiny change to a

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-12 Thread Peter Eisentraut
Is this patch considered ready for review as a backpatch candidate? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-12 Thread Ashutosh Bapat
Sorry, here's the right one. On Wed, Apr 12, 2017 at 6:27 PM, David Rowley wrote: > On 12 April 2017 at 21:45, Ashutosh Bapat > wrote: >> On Wed, Apr 12, 2017 at 12:18 PM, David Rowley >> wrote: >>> On

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-12 Thread David Rowley
On 12 April 2017 at 21:45, Ashutosh Bapat wrote: > On Wed, Apr 12, 2017 at 12:18 PM, David Rowley > wrote: >> On 10 March 2017 at 17:33, Ashutosh Bapat >> wrote: >>> Yes and I also forgot to update

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-12 Thread Ashutosh Bapat
On Wed, Apr 12, 2017 at 12:18 PM, David Rowley wrote: > On 10 March 2017 at 17:33, Ashutosh Bapat > wrote: >> Yes and I also forgot to update the function prologue to refer to the >> fpinfo_o/i instead of inner and outer relations.

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-12 Thread David Rowley
On 10 March 2017 at 17:33, Ashutosh Bapat wrote: > Yes and I also forgot to update the function prologue to refer to the > fpinfo_o/i instead of inner and outer relations. Attached patch > corrects it. Hi Ashutosh, This seems to have conflicted with 28b04787. Do

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-14 Thread Ashutosh Bapat
Added this to 2017/07 commitfest. On Fri, Mar 10, 2017 at 10:03 AM, Ashutosh Bapat wrote: >>> >>> The new name merge_fdw_options() is shorter than the one I chose, but >>> we are not exactly merging options for an upper relation since there >>> isn't the other

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-09 Thread Ashutosh Bapat
>> >> The new name merge_fdw_options() is shorter than the one I chose, but >> we are not exactly merging options for an upper relation since there >> isn't the other fpinfo to merge from. But I think we can live with >> merge_fdw_options(). > > Perhaps "combine" is a better word? I didn't really

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-09 Thread David Rowley
On 9 March 2017 at 18:06, Ashutosh Bapat wrote: >>> >>> Here's the patch attached. >> >> Agreed. It seems like a good idea to keep that logic in a single location > > Ok. > >> >> I've beaten your patch around a bit and come up with the attached. > > The new name

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-08 Thread Ashutosh Bapat
>> >> Here's the patch attached. > > Agreed. It seems like a good idea to keep that logic in a single location Ok. > > I've beaten your patch around a bit and come up with the attached. The new name merge_fdw_options() is shorter than the one I chose, but we are not exactly merging options for

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-08 Thread David Rowley
On 7 March 2017 at 01:22, Ashutosh Bapat wrote: > On Mon, Mar 6, 2017 at 1:29 PM, David Rowley > wrote: >> On 6 March 2017 at 18:51, Etsuro Fujita wrote: >>> On 2017/03/06 11:05, David Rowley wrote: >>

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-06 Thread Ashutosh Bapat
On Tue, Mar 7, 2017 at 9:33 AM, Etsuro Fujita wrote: > On 2017/03/06 21:22, Ashutosh Bapat wrote: >> >> On Mon, Mar 6, 2017 at 1:29 PM, David Rowley >> wrote: >>> >>> On 6 March 2017 at 18:51, Etsuro Fujita

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-06 Thread Etsuro Fujita
On 2017/03/06 21:22, Ashutosh Bapat wrote: On Mon, Mar 6, 2017 at 1:29 PM, David Rowley wrote: On 6 March 2017 at 18:51, Etsuro Fujita wrote: On 2017/03/06 11:05, David Rowley wrote: I looked over yours and was surprised to see: +

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-06 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 1:29 PM, David Rowley wrote: > On 6 March 2017 at 18:51, Etsuro Fujita wrote: >> On 2017/03/06 11:05, David Rowley wrote: >>> The attached patch, based on 9.6, fixes the problem by properly >>> processing the

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-05 Thread David Rowley
On 6 March 2017 at 18:51, Etsuro Fujita wrote: > On 2017/03/06 11:05, David Rowley wrote: >> The attached patch, based on 9.6, fixes the problem by properly >> processing the foreign server options in >> postgresGetForeignJoinPaths(). > > I think the fix would work

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-05 Thread Etsuro Fujita
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

[HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-05 Thread David Rowley
I've been asked to investigate a case of a foreign join not occurring on the foreign server as would have been expected. I've narrowed this down and the problem seems to only occur with outer type joins. The problem can be reproduced by the attached test_case.sql Upon investigation I've