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 1kcFWi-00032l-Ur for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Nov 2020 22:20:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcFWh-00089i-T3 for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Nov 2020 22:20:39 +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 1kcFWh-00089F-Mi for pgsql-bugs@lists.postgresql.org; Mon, 09 Nov 2020 22:20:39 +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 1kcFWf-0000iA-O6 for pgsql-bugs@lists.postgresql.org; Mon, 09 Nov 2020 22:20:38 +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 0A9MKbq52002013; Mon, 9 Nov 2020 17:20:37 -0500 From: Tom Lane To: Kurt Roeckx cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16707: Memory leak In-reply-to: <20201109220329.GC391173@roeckx.be> References: <16707-f5df308978a55bf8@postgresql.org> <1999972.1604957673@sss.pgh.pa.us> <20201109220329.GC391173@roeckx.be> Comments: In-reply-to Kurt Roeckx message dated "Mon, 09 Nov 2020 23:03:29 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2002011.1604960437.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 09 Nov 2020 17:20:37 -0500 Message-ID: <2002012.1604960437@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Kurt Roeckx writes: > On Mon, Nov 09, 2020 at 04:34:33PM -0500, Tom Lane wrote: >> * look in postmaster log for memory dump > ... > Grand total: 3575000 bytes in 533 blocks; 596232 free (450 chunks); 2978= 768 used > Which was for this process: > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND > postgres 10000 2.6 16.3 5547172 5374656 ? Ss Nov08 54:10 postgre= s: synapse synapse [local] idle Hm. It would seem that whatever you're leaking was not allocated via palloc. Have you got any extensions loaded into that backend? It's also worth noting that if you've got 4GB of shared buffers, a total process vsize of 5.3GB doesn't seem all that far out of line. I'm not quite convinced that you have a leak at all, as opposed to processes gradually touching more and more of the shared buffer arena. regards, tom lane