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 1gysnL-0005Cd-Hb for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Feb 2019 06:34:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gysnK-0006p8-03 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Feb 2019 06:34:18 +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 1gysnJ-0006p1-K4 for pgsql-hackers@lists.postgresql.org; Wed, 27 Feb 2019 06:34:17 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gysnH-0002m6-25 for pgsql-hackers@postgresql.org; Wed, 27 Feb 2019 06:34:16 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4881021C57; Wed, 27 Feb 2019 01:34:14 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 27 Feb 2019 01:34:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=JZu3hDJ8ngj7PJQnbBu/S+jvPMs WBUzz0clXfP+63g0=; b=EggIVk06RFMNQWreNL6YdKkQiaQ+JrelaMy403nLToD k0xzctBjPIqoWsBqySzp7iHj1vT8NissFgHhK71uR8IxVMmatOvCZ8aMlJO2Jwr3 rXPiuqEALnsCfBjCwoVOty1HN1ehDWZPDvBkmRJaN2o4UiS+4+M5YBxu6ECK7nsa FocFNhg79T26Ml5FAH6RMnhO5PQPcmIWPWHEw/ggm28BcAwFCY1JcT0hLPdxaxO4 UDATUVP/tk1qKNf2P7mRPQjnYQbfOapAyyQCYAbS1as1XSUmxgCtZHUJd7JTDXcN URFATonUsnUxO9Z3ngDY/OLqXva2ZtHkOOwFhqqxBpQ== 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:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=JZu3hD J8ngj7PJQnbBu/S+jvPMsWBUzz0clXfP+63g0=; b=FH5didzRi6JL3sLksp23Oc cLl5q4CmUYvFEqm8iS0QRCIkuX21KgeCZNx5QZCiMCXn0VLNr8YLn20hI3ZoR5Ze VyZRLefvFTRuj5beoKfaedlBqIy+0i+4MGx3CZy/ldD+gN1iILePE9USFjx3zDiE 9OHVUs39XDMJQ8CBs88A4SIVXErLmrVuLvDRvAUrQDLRG7l3nN5din17Un1at0HT I/VB6ohKUTmjTMrkvzd8GmLANsgHkoF4dGZRVH33C/xZ8RIWLP2CBACnraVjX/KJ wkvR4DarcF9NdMcjysgEK6YyWsFsEackrNPWAPxLSibcH4u/b2fySUjlWrwWcO7A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrvddtgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeduudekrddvgedurddvgeelrddvfedunecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluh hsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (mp76f1f9e7.ap.nuro.jp [118.241.249.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 506081030F; Wed, 27 Feb 2019 01:34:10 -0500 (EST) Date: Wed, 27 Feb 2019 15:34:07 +0900 From: Michael Paquier To: Andres Freund Cc: Jeff Janes , pgsql-hackers , Robert Haas , Haribabu Kommi , Amit Khandekar , Alvaro Herrera , Amit Kapila Subject: Re: TupleTableSlot abstraction Message-ID: <20190227063407.GD3540@paquier.xyz> References: <20180220224318.gw4oe5jadhpmcdnm@alap3.anarazel.de> <20181113233021.nckxp4kalaqzx7ag@alap3.anarazel.de> <20181117004642.hushozrhxs7v72qo@alap3.anarazel.de> <20190227052152.GA3540@paquier.xyz> <20190227054238.c7epq2so7nly5yfh@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bajzpZikUji1w+G9" Content-Disposition: inline In-Reply-To: <20190227054238.c7epq2so7nly5yfh@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --bajzpZikUji1w+G9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 26, 2019 at 09:42:38PM -0800, Andres Freund wrote: > I'm not so sure that's the architecturally correct fix however. Is it > actually guaranteed, given expanded tuples, toasting, etc, that there's > no other memory leak here? I wonder if we shouldn't work twoards using a > short lived memory context here. Note how e.g. printtup() uses a short > lived context for its work. Perhaps. I got to wonder if this change would not impact code using their own DestReceiver, resulting in similar leaks when they insert tuples on-the-fly. Such issues can be surprising for fork an plugin developers. I was playing a bit with some refactoring of relation creation for CTAS in the scope of temporary matviews, and noticed this issue on the CF list, so that was a bit annoying, and issues like that tend to be easily forgotten.. -- Michael --bajzpZikUji1w+G9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlx2L18ACgkQnvQgOdby QH1rFBAAjGNaLUM1AAPlhEnAdzGEHiY7kJJ7gy3pT59Lg0CPyZ9o6ybcr2zoI+xB Ynr7Y5GCLaCwptdPgN3RKbFqlLBP1i+6HjjS3eJ8ycvlpK6SGllnlnJpLp8pVbIG VAMGeMHN4Tx5SnLdL1IA2q0pgLz54nlJj3RmBuTrv6aUQHJtzjcspqO1Cuw9qw9o +bD5w66uJEnnVXcSbO/ZH+N9zXNQeSX4rRr2t4uvDL6QRhedjzQUcaucEB8NjiJG ohVP0ts9PfmhS/bM2YU5qhpWflQC/fnSSAxKAZ0NJB1OaLOkmahcQ4c598F4lEWL mdWaEhCi23Qety2mlx5Mr5YxAdWkAdh6jy8Jcx3odHYi9fWUEjRUbTivucrpiDlW kqRMJLLGDN0Ewqr8O2NPXxsHpmU0Hlhgt/ffEC4aruBKCJQGWQNxBYkE43YmDmW1 2rRptdOc9xzFAfLFHvj8AV5XBwWv1wfqrDMHmqZeNXA5P9ehZUZ+HUOKllXMolE1 OXn2pmDpMD9nkRxaSyEeT68Byugt/mxqC6MIWioyiz175hg9grulYnBAdpL6o2/i 9EwM5p4f4hnSx93B57xdy6Hw2clzPXjA8PxjjjAyUV0nKo2hQhaXNzTVKvS+f4GO 1UPODJhJRXh4U0FkH7NA4OhoN1qk+WSwSgir0Yvkv6LIcVYt0R4= =OdXg -----END PGP SIGNATURE----- --bajzpZikUji1w+G9--