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 1m0Rig-0002OK-2B for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Jul 2021 16:45:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m0Rie-0003vn-0A for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Jul 2021 16:45:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0Rid-0003vd-HI for pgsql-hackers@lists.postgresql.org; Mon, 05 Jul 2021 16:45:15 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m0RiW-0007FF-FD for pgsql-hackers@lists.postgresql.org; Mon, 05 Jul 2021 16:45:13 +0000 Received: by mail-io1-xd36.google.com with SMTP id l5so21575457iok.7 for ; Mon, 05 Jul 2021 09:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bdTSF5DNYk02ZudUCAOsbPJrG6b5HaGwZlLScB8NWjE=; b=HlL7znBCb/XrxvycK/ta3DPtWFmcYCMRWq0+c5NIvzLoNlYcosPK4KUQx5E6q+8kPA sMFA5XAltu50/BeZd73eN/pD04/1oz6MKoTXGWdqjsRYatLV3fk3gSX9wahofV5PSmcF 4XUGKzkQjeURhofmoa7Mnu3o5p7+Uc0EifvgK5I0RBp4gH3MR7FRnJoakp0Itu2dVkHq ecFlM4fjs0o7cjVIAApnKYF41ZnIcuYn8q/0GG4kb3PeckPPs+yqvGPxhDLFqh3C20ff mUV7VKRxEF20fvPzMWIQm+lCpTQjzYyUFVhL0eibjBpRSlhoKkXblAqXZSJSN9yJieH1 Fmwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bdTSF5DNYk02ZudUCAOsbPJrG6b5HaGwZlLScB8NWjE=; b=otiP0cXNsATiRuZwAOsXJqcHqjwVDk182y9jGn+4Fl5AP7uvh1eSqdMVhJELl1zWtw HUcZF6hDCuY09C4CbqiENYFryrq811zBmn3QPvkA7i2Ma2ecOF08mk8Q/nQEiLztTfEP 213CahZtWI5YVLgk4GMd/z7W5LsFtx3j3HToUBQdJ4XJey0fhmxpbRf6sdeSyIvovyau ed/7J/oPeJnetomNBqpFQiBFkxpkQgvu86sC4YO4jF60mW5U64Ottb1O3k7a1hzB3whp cTYQl6VTS8tOTLCDO6BUMlaxZgONAlz04d8Zt4Cr8vvz1rBCGIY2NXCfZlvARc1xzhPq L3Ew== X-Gm-Message-State: AOAM532zKPO75tnDT2Slhs6/fo+XjF7nBKpGVkssBzQW7UaxGY934YGl hpdp4fgg4ni/xIReoSMahgae8g== X-Google-Smtp-Source: ABdhPJwZOUVpjtjDLDhskNVLdtQ/fse70uvpO60MnEwAZSCdHVHaEWqLOpugkwXZyFIbUr1ARS9FkQ== X-Received: by 2002:a02:9706:: with SMTP id x6mr13221811jai.125.1625503507595; Mon, 05 Jul 2021 09:45:07 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id l8sm6613814iok.26.2021.07.05.09.45.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jul 2021 09:45:07 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id C74ED800C6F; Mon, 5 Jul 2021 11:45:05 -0500 (CDT) Date: Mon, 5 Jul 2021 11:45:05 -0500 From: Justin Pryzby To: David Rowley Cc: Nitin Jadhav , Zhihong Yu , pgsql-hackers@lists.postgresql.org Subject: Re: Removed extra memory allocations from create_list_bounds Message-ID: <20210705164505.GZ21248@telsasoft.com> References: <20210516170029.GB373@telsasoft.com> <20210517150310.GG373@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 06, 2021 at 01:48:52AM +1200, David Rowley wrote: > On Wed, 19 May 2021 at 05:28, Nitin Jadhav wrote: > > I have rebased all the patches on top of > > 'v2_0001-removed_extra_mem_alloc_from_create_list_bounds.patch'. > > Attaching all the patches here. > > I had a look over these and I think what's being done here is fine. Thanks for loooking. 0001 is missing a newline before create_list_bounds() 0003 is missing pfree(all_bounds), which I had as 0005. It 1) allocates all_bounds; 2) allocates rbounds; 3) copies all_bounds into rbounds; 4) allocates boundDatums; 5) copies rbounds into boundDatums; 6) frees rbounds; 7) returns boundInfo with boundinfo->datums. > The good news is, we can just give partition_bounds_copy() the same > treatment. 0004 does that. +1 > I've attached another set of patches. I squashed all the changes to > each create_*_bounds function into a patch of their own. Perhaps 0002 > and 0003 which handle range and hash partitioning can be one patch > since Justin seemed to write that one. I kept 0001 separate since > that's Nitin's patch plus Justin's extra parts. It seems easier to > credit properly having the patches broken out like this. I think it's > excessive to break down 0001 into Nitin and Justin's individual parts. If you wanted to further squish the patches together, I don't mind being a co-author. Cheers, -- Justin