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 1mubvM-0001Up-KQ for pgsql-general@arkaria.postgresql.org; Tue, 07 Dec 2021 14:58:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mubup-0003GW-LL for pgsql-general@arkaria.postgresql.org; Tue, 07 Dec 2021 14:57:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mubup-0003GN-BC for pgsql-general@lists.postgresql.org; Tue, 07 Dec 2021 14:57:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mubum-0000rj-KE for pgsql-general@lists.postgresql.org; Tue, 07 Dec 2021 14:57:59 +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 1B7EvrQm3484561; Tue, 7 Dec 2021 09:57:54 -0500 From: Tom Lane To: Klaudie Willis cc: "pgsql-general@lists.postgresql.org" Subject: Re: When Update balloons memory In-reply-to: References: Comments: In-reply-to Klaudie Willis message dated "Tue, 07 Dec 2021 09:15:57 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3484559.1638889073.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Dec 2021 09:57:53 -0500 Message-ID: <3484560.1638889073@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Klaudie Willis writes: > The following statement below, when not divided up into chunks, but run = across all 800M rows, did trigger an OOM-kill from the OS. An UPDATE should only result in memory bloat if it's queuing trigger events to be processed at end-of-statement. You claim there are no triggers, but are you sure? (what about foreign keys?) Otherwise, it seems possible that you've identified a memory leak, but there's not enough detail here to investigate. Can you create a reproducible test case? regards, tom lane