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 (pgsql-hackers@postgresql.org) To make changes to you

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 t

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 >>> backported to 9.6 as well. Atta

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 should be >>> backported to 9.6 as well

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 on

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 the patch (_96) for 9.6, >> create

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 > appl

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. The v4 patch should > apply to 9.6. Diffing the two patches I see a

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 comment, of which I think needs re-worde

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 s

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 10 March 2017 at 17:33, Ashutosh Bapat >>> wrote: Yes and I also forgot to update the f

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 the function prologue to refer to the >>> fpinfo_o/i instead of inner and outer relations. Attache

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. Attached patch >> corrects it. > > Hi Ashutosh, > > This seems to

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

2017-04-11 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 you want to rebase, or should I?

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 fpinfo to merge from. But I think we

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 s

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 merge_fdw_options() is shorter than

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 a

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: >> It seems like a much better idea to keep the server option processing >> in one location, whic

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 >>> wrote: On 2017/03/06 11:05, David Rowley wrote: >>> >>> I looked over yours

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: + /* is_foreign_expr might need server and shippable-extension

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 foreign server options in >>> postgresGetForeignJoinPaths(). >>

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 well, but another way I think i

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 postgresGetForeignJoinPath