Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ioicF-00029U-7X for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Jan 2020 06:45:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ioicD-0007dx-Pr for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Jan 2020 06:45:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ioicC-0007bE-Mn for pgsql-bugs@lists.postgresql.org; Tue, 07 Jan 2020 06:45:21 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ioic9-0005yH-SF for pgsql-bugs@lists.postgresql.org; Tue, 07 Jan 2020 06:45:19 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8390A2216E; Tue, 7 Jan 2020 01:45:16 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 07 Jan 2020 01:45:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:cc:from:message-id; s=fm3; bh=3MFrJZjXwAuxX7q5r4FR/8zpnci2lQnfbPqUEGQhmb8=; b=e0R1rPFsrbQU Fdu4V3IdLKYNGeNGL6Pp3tS6PSQsr9x4DgzbNVx62xdOUNp3/S/+3xWyyL26avC5 FzgR4QPVJWDS+/pnVsZ0lOLMfybnCWXOV7xhrTDWbQpX466J9WLCLfIzQzVawpVE sfZz4Xk/R07T9i0BRDVENAaSJBpa8phhlcBVE/dTomknTlkNpEaB5cwFb7BL4a3M nKE4MLvKnQRdAQe7reKaR1pOQ4kSbgAndZe1HHqoCcxVrIxjezHb2PDLJdM6eKP/ JibtkZ6t48gWJc6rqxniNUJjhzzr5Ktq5cjUK5AN2afp3cM2KrOTQ2p7k3hrpark koK2EyE5/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3MFrJZjXwAuxX7q5r4FR/8zpnci2lQnfbPqUEGQhm b8=; b=hAWZnI+NTczxtEQ9qyyRq4FxLeox+oasD9p2TJLfvjHNzHInw1kVdv9x/ /NtuMN56uT4IjTPmJgZjaT0ly60kWf84NZGLc5S/UqCO/27+XIjDQMhoQzgg/4dp x3vRpDSoVH3ACDW0dYOCH1smSoU6VPDNtE3jH1VSyhq+x3FdL8XurI6GtqxcFzb5 AQCN1SBCX8r1F/lDw9+hf9EQaP9KH8D9VxKHJ/kbF5lWkoawkgsTwrlGT/wW4c6k vp7MYYgve3NktDKE6bOp2Y7PCoVYlDiIxgwCw1TEdkYrkWryT5RHaSqxQUDguglY MrPnrKEEELVHCg/im884xpqTB9TQQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdehuddguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepffgfjghfgggtgffuvffhkfesthhqmhdt tderjeenucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrg hrrgiivghlrdguvgeqnecukfhppedujedvrdehkedrleehrddvieenucfrrghrrghmpehm rghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggvnecuvehluhhsthgvrh fuihiivgeptd X-ME-Proxy: Received: from [IPv6:2607:fb90:9ce9:f483:ac36:4d9b:c696:a281] (unknown [172.58.95.26]) by mail.messagingengine.com (Postfix) with ESMTPA id 20E038005B; Tue, 7 Jan 2020 01:45:15 -0500 (EST) Date: Mon, 06 Jan 2020 22:45:08 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <20200107064412.GG2386@paquier.xyz> References: <16190-70181c803641c3dc@postgresql.org> <20200106051800.GL3598@paquier.xyz> <1234.1578291695@sss.pgh.pa.us> <20200106174443.3pwnmshbxrbwggrm@alap3.anarazel.de> <20200107012741.GD2386@paquier.xyz> <7984.1578363125@sss.pgh.pa.us> <20200107022654.vgfwx7hactiokcsa@alap3.anarazel.de> <20200107064412.GG2386@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: BUG #16190: The usage of NULL pointer in refint.c To: Michael Paquier CC: Tom Lane ,starbugs@qq.com,pgsql-bugs@lists.postgresql.org From: Andres Freund Message-ID: <8E6576C7-9CC1-47AB-BE4D-F545345029AB@anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On January 6, 2020 10:44:12 PM PST, Michael Paquier wrote: >On Mon, Jan 06, 2020 at 06:26:54PM -0800, Andres Freund wrote: >> On 2020-01-06 21:12:05 -0500, Tom Lane wrote: >>> WFM=2E There are probably more elegant ways to do it than to drop >this >>> stuff into TopMemoryContext, but this is surely better than >unchecked >>> malloc calls=2E >>=20 >> Yea, it's certainly better than the current situation=2E An incremental >> improvement would be to do the allocations in a separate contect, for >easier >> debugging should there ever be a leak=2E=2E=2E > >Sure=2E I am not sure if that's worth the extra work though, so I would >just be tempted to commit the patch that moves the allocation to >TopMemoryContext and call it a day=2E Any objections to that? Not from here --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E