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 1lRfVn-0006JJ-21 for pgsql-general@arkaria.postgresql.org; Wed, 31 Mar 2021 18:24:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRfVl-0003Kk-M2 for pgsql-general@arkaria.postgresql.org; Wed, 31 Mar 2021 18:24:13 +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 1lRfVl-0003Jk-EC for pgsql-general@lists.postgresql.org; Wed, 31 Mar 2021 18:24:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRfVj-0001ND-Dt for pgsql-general@lists.postgresql.org; Wed, 31 Mar 2021 18:24:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12VIOAms3269481; Wed, 31 Mar 2021 14:24:10 -0400 From: Tom Lane To: Stephan Knauss cc: "pgsql-generallists.postgresql.org" Subject: Re: Debugging leaking memory in Postgresql 13.2/Postgis 3.1 In-reply-to: <6ea52e56-b401-7716-f592-a8fdc98df667@stephans-server.de> References: <9f73e655-14b8-feaf-bd66-c0f506224b9e@stephans-server.de> <2919657.1617129981@sss.pgh.pa.us> <6ea52e56-b401-7716-f592-a8fdc98df667@stephans-server.de> Comments: In-reply-to Stephan Knauss message dated "Wed, 31 Mar 2021 20:08:23 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3269479.1617215050.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 31 Mar 2021 14:24:10 -0400 Message-ID: <3269480.1617215050@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Stephan Knauss writes: > Hello Tom, the output below looks similar to the OOM output you = > expected. Can you give a hint how to interpret the results? Looks like the answer is that wherever the leak is, it's not accounted for by this info; none of those contexts are particularly large. Based on nearby threads, it occurs to me to ask whether you have JIT enabled, and if so whether turning it off helps. There seems to be a known leak of the code fragments generated by that in some cases. If that's not it, then the leak must be accumulating through plain old malloc calls. There's not much of that in the core backend (although if you use ispell text search dictionaries, maybe [1] is relevant), so my suspicions would next fall on any extensions you might be using. regards, tom lane [1] https://git.postgresql.org/gitweb/?p=3Dpostgresql.git&a=3Dcommitdiff&h= =3Deba939551