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 1pnWZv-0001QI-NB for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Apr 2023 03:27:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pnWZu-0004IP-8j for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Apr 2023 03:27:54 +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 1pnWZt-0004IF-VT for pgsql-hackers@lists.postgresql.org; Sat, 15 Apr 2023 03:27:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pnWZr-002yiz-Eb for pgsql-hackers@postgresql.org; Sat, 15 Apr 2023 03:27:53 +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 33F3RnIe1610170; Fri, 14 Apr 2023 23:27:49 -0400 From: Tom Lane To: David Rowley cc: Justin Pryzby , pgsql-hackers@postgresql.org Subject: Re: v16dev: invalid memory alloc request size 8488348128 In-reply-to: References: Comments: In-reply-to David Rowley message dated "Sat, 15 Apr 2023 13:20:01 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1610168.1681529269.1@sss.pgh.pa.us> Date: Fri, 14 Apr 2023 23:27:49 -0400 Message-ID: <1610169.1681529269@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > I don't think that's really going to help. The crash already tells us > there's a problem down the line, but if the commit you mention is to > blame for this, then the problem is elsewhere, either in our > assumption that we can get away without the datumCopy() or in the > aggregate function producing the state that we're no longer copying. It does smell like the aggregate output has been corrupted by the time it got to the plpgsql function. I don't particularly want to try to synthesize a test case from the essentially-zero SQL-level information we've been provided, though. And I doubt we can track this down without a test case. So please try to sanitize the case you have enough that you can share it. regards, tom lane