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 1lt9Mo-0001N2-RO for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 13:44:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lt9Mn-0006re-Pk for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 13:44:33 +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 1lt9Mn-0006rW-FU for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 13:44:33 +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 1lt9Mh-0003rn-2S for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 13:44:32 +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 15FDhMdO354946; Tue, 15 Jun 2021 09:43:23 -0400 From: Tom Lane To: paul.malm@lfv.se cc: pgsql-general@lists.postgresql.org Subject: Re: Memory alloc exception In-reply-to: <1d5fe4184f914a86aabca8ede3cbcc38@lfv.se> References: <1d5fe4184f914a86aabca8ede3cbcc38@lfv.se> Comments: In-reply-to message dated "Tue, 15 Jun 2021 11:09:12 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <354944.1623764602.1@sss.pgh.pa.us> Date: Tue, 15 Jun 2021 09:43:22 -0400 Message-ID: <354945.1623764602@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk writes: > I get this error when running a SQL statement in my Java application. > ERROR: Invalid memory alloc request size 1683636507 This is a pretty common symptom of corrupt data (specifically, that the length word of a variable-length field is garbage). More than that can't be said with the info you've provided. But I'd be thinking about "how do I clean up the corruption and prevent a recurrence", not "I need to increase memory settings". regards, tom lane