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 1m6bly-0005AQ-NF for pgsql-performance@arkaria.postgresql.org; Thu, 22 Jul 2021 16:42:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6blx-0004Az-Ig for pgsql-performance@arkaria.postgresql.org; Thu, 22 Jul 2021 16:42:09 +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 1m6blx-00047D-Ak for pgsql-performance@lists.postgresql.org; Thu, 22 Jul 2021 16:42:09 +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 1m6blv-00010S-CH for pgsql-performance@postgresql.org; Thu, 22 Jul 2021 16:42:08 +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 16MGg2oU787781; Thu, 22 Jul 2021 12:42:02 -0400 From: Tom Lane To: Peter Geoghegan cc: David Rowley , "ldh@laurent-hasson.com" , Justin Pryzby , "pgsql-performance@postgresql.org" Subject: Re: Big performance slowdown from 11.2 to 13.3 In-reply-to: References: <20210721191528.GC19620@telsasoft.com> <732758.1626911007@sss.pgh.pa.us> <784576.1626968702@sss.pgh.pa.us> <785218.1626969409@sss.pgh.pa.us> <786600.1626970898@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Thu, 22 Jul 2021 09:36:02 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <787779.1626972122.1@sss.pgh.pa.us> Date: Thu, 22 Jul 2021 12:42:02 -0400 Message-ID: <787780.1626972122@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > On Thu, Jul 22, 2021 at 9:21 AM Tom Lane wrote: >> Yeah, I should have said "2GB plus palloc slop". It doesn't surprise >> me a bit that we seem to be eating another 20% on top of the nominal >> limit. > MAX_KILOBYTES is the max_val for the work_mem GUC itself, and has been > for many years. Right. The point here is that before v13, hash aggregation was not subject to the work_mem limit, nor any related limit. If you did an aggregation requiring more than 2GB-plus-slop, it would work just fine as long as your machine had enough RAM. Now, the performance sucks and there is no knob you can turn to fix it. That's unacceptable in my book. regards, tom lane