Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avxqa-0006B1-6d for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Apr 2016 02:08:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1avxqZ-0005cf-PE for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Apr 2016 02:07:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1avxpD-0003vp-My for pgsql-hackers@postgresql.org; Fri, 29 Apr 2016 02:06:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1avxpB-0005eJ-2l for pgsql-hackers@postgresql.org; Fri, 29 Apr 2016 02:06:34 +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 u3T26RDc020755; Thu, 28 Apr 2016 22:06:27 -0400 From: Tom Lane To: Andreas Seltenreich cc: Robert Haas , pgsql-hackers@postgresql.org Subject: Re: [sqlsmith] Crash in apply_projection_to_path In-reply-to: <871t5pgwdt.fsf@credativ.de> References: <871t5pgwdt.fsf@credativ.de> Comments: In-reply-to Andreas Seltenreich message dated "Fri, 29 Apr 2016 01:13:18 +0200" Date: Thu, 28 Apr 2016 22:06:27 -0400 Message-ID: <20754.1461895587@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 Andreas Seltenreich writes: > the following query against the regression database crashes master as of > 23b09e15. > select 1 from depth0 inner join depth1 on (depth0.c = depth1.c) > where depth0.c @@ depth1.c limit 1; What's going on here is that add_partial_path is recycling a now-dominated partial path without regard for the fact that there's already a GatherPath pointing at that old partial path. Later use of the GatherPath tries to make use of its now-dangling subpath pointer. I'd be inclined to think that it's silly to build GatherPaths in advance of having finalized the list of partial paths for a rel. 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