Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRdHW-0001Pf-Bt for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2020 14:56:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRdHV-0001MX-8u for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2020 14:56:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRdHV-0001MQ-24 for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2020 14:56:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRdHS-0004Ua-MZ for pgsql-hackers@postgresql.org; Thu, 23 Apr 2020 14:56:48 +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 03NEugLV004239; Thu, 23 Apr 2020 10:56:42 -0400 From: Tom Lane To: Tomas Vondra cc: Richard Guo , James Coleman , Justin Pryzby , pgsql-hackers Subject: Re: sqlsmith crash incremental sort In-reply-to: <20200423095700.2iwhfiqjqy7lgzbk@development> References: <20200413000943.bejni6axj7v4q5rn@development> <20200415144712.wyvpgvsujzzcf2qg@development> <20200417005420.ye342t2nljg4nuhk@development> <20403.1587086800@sss.pgh.pa.us> <20200419234729.tglhf2iqlpkkpk3m@development> <20200422225919.ucs5xnlgnr5ekhod@development> <20200423095700.2iwhfiqjqy7lgzbk@development> Comments: In-reply-to Tomas Vondra message dated "Thu, 23 Apr 2020 11:57:00 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4237.1587653802.1@sss.pgh.pa.us> Date: Thu, 23 Apr 2020 10:56:42 -0400 Message-ID: <4238.1587653802@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > On Thu, Apr 23, 2020 at 03:28:21PM +0800, Richard Guo wrote: >> A minor comment is that I don't think we need to strip relabel >> explicitly before calling pull_varnos(), because this function would >> recurse into T_RelabelType nodes. > Hmmm, yeah. I think you're right that's unnecessary. I misread the > walker function, I think. +1, might as well simplify the code. >> Also do we need to call bms_free(varnos) for each pathkey here to avoid >> waste of memory? > I don't think so. It wouldn't hurt, but we don't do that for other > pull_vernos calls either AFAICS. Yeah, the planner is generally pretty profligate of memory, and these bitmaps aren't likely to be huge anyway. regards, tom lane