Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebxrb-0001oI-Jz for pgsql-admin@arkaria.postgresql.org; Thu, 18 Jan 2018 00:15:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebxra-0000YD-W8 for pgsql-admin@arkaria.postgresql.org; Thu, 18 Jan 2018 00:15:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebxra-0000Y4-M8 for pgsql-admin@lists.postgresql.org; Thu, 18 Jan 2018 00:15:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ebxrW-0003se-Rd for pgsql-admin@lists.postgresql.org; Thu, 18 Jan 2018 00:15: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 w0I0FKBC003139; Wed, 17 Jan 2018 19:15:20 -0500 From: Tom Lane To: Davlet Panech cc: pgsql-admin@lists.postgresql.org Subject: Re: Abnormally high memory usage/OOM triggered In-reply-to: <4d52fee7-73ba-16a9-9c27-8ae5107ee6ae@gmail.com> References: <4d52fee7-73ba-16a9-9c27-8ae5107ee6ae@gmail.com> Comments: In-reply-to Davlet Panech message dated "Wed, 17 Jan 2018 16:57:28 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3137.1516234520.1@sss.pgh.pa.us> Date: Wed, 17 Jan 2018 19:15:20 -0500 Message-ID: <3138.1516234520@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Davlet Panech writes: > I'm troubleshooting a problem with a Postgres installation (Linux): a > client process got killed by OOM while executing an update statement, > Is there a memory leak in there somewhere? > I'm using Postgres 9.4.8 on x86_64-redhat-linux-gnu with 16GB of > physical RAM and 8GB of swap space. I see a possibly relevant entry in the 9.4.10 release notes: Fix query-lifespan memory leak in a bulk UPDATE on a table with a PRIMARY KEY or REPLICA IDENTITY index Looking at the relevant commit (ae4760d66), it seems the leak was just a few bytes per row, but if the update touches enough rows ... regards, tom lane