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 1kQCtj-0007TP-MU for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Oct 2020 17:06:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kQCti-00050m-5r for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Oct 2020 17:06:38 +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 1kQCth-00050e-Vz for pgsql-bugs@lists.postgresql.org; Wed, 07 Oct 2020 17:06:37 +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 1kQCtg-0003ff-10 for pgsql-bugs@lists.postgresql.org; Wed, 07 Oct 2020 17:06:37 +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 097H6YBS2233627; Wed, 7 Oct 2020 13:06:34 -0400 From: Tom Lane To: zubkov318@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16659: postgresql leaks memory or do not limit its usage In-reply-to: <16659-2fdaaf7b4e591df9@postgresql.org> References: <16659-2fdaaf7b4e591df9@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 07 Oct 2020 12:28:16 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2233625.1602090394.1@sss.pgh.pa.us> Date: Wed, 07 Oct 2020 13:06:34 -0400 Message-ID: <2233626.1602090394@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > I migrated a database from postgresql 10.14 in a container to > postgres:13-alpine in docker. After a migration I see that postgresql > processes alltogether eat memory without limits until OOM comes. Not much to go on here. If you have debug symbols available, maybe you could attach gdb to one of the bloated processes and do call MemoryContextStats(TopMemoryContext) which'd produce a memory usage report on the server's stderr. Another idea is to start the server under a smaller ulimit, in hopes of getting ENOMEM failures before reaching the point of triggering OOM kills. That would also result in memory usage reports, so you could get one even if it's a non-debug build. Otherwise, we'll have to ask for a reproducible test case ... regards, tom lane