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 1h4TLI-0002A5-0z for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Mar 2019 16:36:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4TLG-0005ti-M8 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Mar 2019 16:36:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4TLG-0005oI-Bp for pgsql-hackers@lists.postgresql.org; Thu, 14 Mar 2019 16:36:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4TLE-0004lI-Aw for pgsql-hackers@lists.postgresql.org; Thu, 14 Mar 2019 16:36:25 +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 x2EGaK90003970; Thu, 14 Mar 2019 12:36:20 -0400 From: Tom Lane To: Robert Haas cc: Alvaro Herrera , PostgreSQL Hackers Subject: Re: hyrax vs. RelationBuildPartitionDesc In-reply-to: References: <20190313164232.GA5270@alvherre.pgsql> <7448.1552497345@sss.pgh.pa.us> <7961.1552498252@sss.pgh.pa.us> <10788.1552501588@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Thu, 14 Mar 2019 12:16:51 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3968.1552581380.1@sss.pgh.pa.us> Date: Thu, 14 Mar 2019 12:36:20 -0400 Message-ID: <3969.1552581380@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > I did not back-patch, because the code is in a different file in v11, > none of the hunks of the patch apply on v11, and v11 is not failing on > hyrax. Hmm, I wonder why not. I suppose the answer is that the leak is worse in HEAD than before, but how come? I followed your reference to 898e5e329, and I've got to say that the hunk it adds in relcache.c looks fishy as can be. The argument that the rd_pdcxt "will get cleaned up eventually" reads to me like "this leaks memory like a sieve", especially in the repeated-rebuild scenario which is exactly what CLOBBER_CACHE_ALWAYS would provoke. Probably the only thing that keeps it from being effectively a session-lifespan leak is that CCA will generally result in relcache entries being flushed entirely as soon as their refcount goes to 0. Still, because of that, I wouldn't think it'd move the needle very much on a CCA animal; so my guess is that there's something else. regards, tom lane