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 1kkoZX-0004Ke-Br for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 13:22:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkoZV-000273-Vn for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 13:22:57 +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 1kkoZV-00025t-5P for pgsql-hackers@lists.postgresql.org; Thu, 03 Dec 2020 13:22:57 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkoZQ-0004bJ-Rt for pgsql-hackers@lists.postgresql.org; Thu, 03 Dec 2020 13:22:56 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id F0E4F9C4; Thu, 3 Dec 2020 08:22:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 03 Dec 2020 08:22:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=YMUKU6BgGJGKfLL4L aQRM3hIryVb2tsC5AdMOXqjFk4=; b=Mc8urBmawRZ67lgXYG5B8buPxXuEIpxOy +D/a/khaU7GAKVhGIGdmEAAzl6DcPNEbwCNeCCnWbnHMVKfuHxogDKzftt61aggo 8osyB7EKVm8+LqDO5RUKLzliZJ5kBVXK47Aw7W6UbOQdXhX3Tx9IWLRzSU8xtpR2 j9eNXciyNVzG2NeeA3S+yZWYmr+UCEYupHeZSwBOTgn9b5MdZmSuh6rbpepAAWN5 Et+73OoRR4q3kMkd8WOIymv4s9S8paYLb3frQ3Ms0cGT1ceULCFia2l3InA5wM74 1fu94Ul7hY71fapU43XM86XGCe8QXAZINLoWe9+/Hj7Ez/XiDT9Ww== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeiiedghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtuggjfgesthdtre dttdervdenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvefgleevgeeuje eghfegteeghfegheeifeehheelteetieduieeihffggfehffetnecukfhppeduledtrdel hedrudekrdejleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.18.79]) by mail.messagingengine.com (Postfix) with ESMTPA id 7D38D1080057; Thu, 3 Dec 2020 08:22:49 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 401CA2A151F; Thu, 3 Dec 2020 10:22:47 -0300 (-03) Date: Thu, 3 Dec 2020 10:22:47 -0300 From: Alvaro Herrera To: Kyotaro Horiguchi Cc: amitlangote09@gmail.com, keisuke.kuroda.3862@gmail.com, tatsuro.yamada.tf@nttcom.co.jp, pgsql-hackers@lists.postgresql.org, tatsuhito.kasahara.rd@hco.ntt.co.jp Subject: Re: Huge memory consumption on partitioned table with FKs Message-ID: <20201203132247.GA17011@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203.171316.1242674483141105976.horikyota.ntt@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello I haven't followed this thread's latest posts, but I'm unclear on the lifetime of the new struct that's being allocated in TopMemoryContext. At what point are those structs freed? Also, the comment that was in RI_ConstraintInfo now appears in RI_ConstraintParam, and the new struct (RI_ConstraintInfo) is now undocumented. What is the relationship between those two structs? I see that they have pointers to each other, but I think the relationship should be documented more clearly. Thanks!