Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awXp5-0002fd-Ve for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Apr 2016 16:32:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1awXp5-00070g-I0 for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Apr 2016 16:32:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1awXp4-00070a-Tj for pgsql-hackers@postgresql.org; Sat, 30 Apr 2016 16:32:50 +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_2) (envelope-from ) id 1awXp1-0006sa-Mu for pgsql-hackers@postgresql.org; Sat, 30 Apr 2016 16:32:50 +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 u3UGWdkC020536; Sat, 30 Apr 2016 12:32:39 -0400 From: Tom Lane To: Amit Kapila cc: Robert Haas , Andreas Seltenreich , "pgsql-hackers@postgresql.org" Subject: Re: [sqlsmith] Crash in apply_projection_to_path In-reply-to: References: <871t5pgwdt.fsf@credativ.de> <20754.1461895587@sss.pgh.pa.us> <13430.1461938599@sss.pgh.pa.us> Comments: In-reply-to Amit Kapila message dated "Sat, 30 Apr 2016 11:29:06 +0530" Date: Sat, 30 Apr 2016 12:32:39 -0400 Message-ID: <20535.1462033959@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Amit Kapila writes: > On Fri, Apr 29, 2016 at 7:33 PM, Tom Lane wrote: >> make_join_rel is certainly not far enough down the call stack to solve >> this problem. It can, and typically will, be invoked multiple times >> for the same target join relation. >> >> One possible answer is to do it in standard_join_search, just before >> the set_cheapest call for each join relation. > Yes, that makes sense to me. Done that way. > Yet, another idea could be to create a copy of partial path before passing > it to create_gather_path()? That's just a kluge, and I'm not exactly convinced it'd solve the problem anyway, unless you wanted to recursively copy the entire infrastructure of the partial path. What's needed is to set rules for how we build paths up in an orderly fashion. Such rules already existed for regular paths (see the comments I added in c45bf5751), and now they exist for parallel paths as well. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers