Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YrcIS-0006jq-W2 for pgsql-committers@arkaria.postgresql.org; Mon, 11 May 2015 01:14:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YrcIR-0006Mn-Sg for pgsql-committers@arkaria.postgresql.org; Mon, 11 May 2015 01:14:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YrcIR-0006Md-2M for pgsql-committers@postgresql.org; Mon, 11 May 2015 01:14:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1YrcIN-0004k6-Q1 for pgsql-committers@postgresql.org; Mon, 11 May 2015 01:14:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t4B1E8ur016110; Sun, 10 May 2015 21:14:08 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , pgsql-committers@postgresql.org Subject: Re: pgsql: Code review for foreign/custom join pushdown patch. In-reply-to: <20150511010222.GJ12950@alap3.anarazel.de> References: <20150511010222.GJ12950@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 11 May 2015 03:02:22 +0200" Date: Sun, 10 May 2015 21:14:08 -0400 Message-ID: <16109.1431306848@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Andres Freund writes: > On 2015-05-10 18:36:45 +0000, Tom Lane wrote: >> * Consider foreign joins only between foreign tables on the same server, >> rather than between any two foreign tables with the same underlying FDW >> handler function. In most if not all cases, the FDW would simply have had >> to apply the same-server restriction itself (far more expensively, both for >> lack of caching and because it would be repeated for each combination of >> input sub-joins), or else risk nasty bugs. Anyone who's really intent on >> doing something outside this restriction can always use the >> set_join_pathlist_hook. > Hm. I'm not sure I can agree with that judgement. It does not seem that > far fetched to want to push joins between two different FDW servers to > one FDW. What I doubt is that people can do that *correctly*. See my counterexamples in the pgsql-hackers thread. In any case, as also noted on that thread, an FDW that wants to adjust this behavior could do so by changing RelOptInfo.serverid to match the ID of the selected common server during GetForeignPaths. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers