Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qrNb2-003xsE-B4 for pgsql-admin@arkaria.postgresql.org; Fri, 13 Oct 2023 19:13:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qrNa1-002uRg-Ec for pgsql-admin@arkaria.postgresql.org; Fri, 13 Oct 2023 19:12:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with utf8esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qrNa1-002uRX-0Q for pgsql-admin@lists.postgresql.org; Fri, 13 Oct 2023 19:12:13 +0000 Received: from facteur.thefreecat.org ([212.129.38.6]) by makus.postgresql.org with utf8esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qrNZt-000Kog-Rk for pgsql-admin@lists.postgresql.org; Fri, 13 Oct 2023 19:12:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thefreecat.org; s=thefreecat; t=1697224323; bh=+1Kbw/1NCXqjbXrPIrCkya8LsSix4UNjBctqWc4iADE=; h=Date:Subject:To:References:From:In-Reply-To; b=Db/z/T2PfVBimF/v3I9bYKP6qcYuuqk3m/e/xb+CQRyGhqrI40dIlHH9+MXegG5gA EZF/d9biBxt49q9trAVEAgE1/ViD1tTLQBBDTrlZrpuOrRfMS6PeuIPs3BGKXntrr5 ofjPbBwny9wmHD+64z+K0QPG+lW5pxxvogE987QvpeztazBpAsbK3abGLMzwl Original-Subject: Re: One PG process eating more than 40GB of RAM and getting killed by OOM Original-From: Jean-Christophe Boggio Received: from [192.168.1.78] (91-167-190-143.subs.proxad.net [::ffff:91.167.190.143]) (AUTH: LOGIN cat, TLS: TLS1.3,128bits,ECDHE_RSA_AES_128_GCM_SHA256) by facteur.thefreecat.org with ESMTPSA id 0000000009DC076B.0000000065299683.00202B60; Fri, 13 Oct 2023 21:12:03 +0200 Message-ID: <416d1607-4650-4624-b8e5-46f8a674aebf@thefreecat.org> Date: Fri, 13 Oct 2023 21:12:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: One PG process eating more than 40GB of RAM and getting killed by OOM To: pgsql-admin References: <1018f9c0-9d14-4146-b7e9-24c48ea29e1d@thefreecat.org> <897a43b3-60d0-2417-f821-9299fd204c1d@sqlexec.com> Content-Language: fr-FR, en-US From: Jean-Christophe Boggio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Le 13/10/2023 à 18:48, Jeff Janes a écrit : > Yes, turning off overcommit doesn't play with graphical environments, > in my experience. But a production database probably shouldn't be > running on a system like that. On non-prod systems, you can either > turn it off temporarily, or you could try to catch the problem before > it becomes fatal and get the log with pg_log_backend_memory_contexts. As I said, this is my dev laptop and no, I would never waste precious RAM this way on a production server ;-) >  We can see what the problem is (over 137,000 concurrent tuple sorts), > but we can't tell what is ultimately causing it.  You will need to dig > into, or disclose, the contents of the procedure. I have no problem disclosing this code and data to the PG dev team (this is client data though so please keep it for yourselves). Where can I send you a link to the dump ? Best, JC