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 1jxVfi-0001J4-Uq for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2020 13:17: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 1jxVfh-000476-Si for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2020 13:17: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 1jxVfh-00046z-Lt for pgsql-hackers@lists.postgresql.org; Mon, 20 Jul 2020 13:17: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 1jxVfe-0000SW-Li for pgsql-hackers@postgresql.org; Mon, 20 Jul 2020 13:17: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 06KDHLa9400618; Mon, 20 Jul 2020 09:17:21 -0400 From: Tom Lane To: Tomas Vondra cc: Jeff Davis , Peter Geoghegan , Alvaro Herrera , David Rowley , Stephen Frost , Andres Freund , Bruce Momjian , Robert Haas , Justin Pryzby , Melanie Plageman , "pgsql-hackers@postgresql.org" Subject: Re: Default setting for enable_hashagg_disk In-reply-to: <20200720004827.4c46ikcdrfum6xyu@development> References: <5cf74833a830e76cc7cc7506aa77bd6ab0c94f4c.camel@j-davis.com> <20200713164736.GA25726@alvherre.pgsql> <9e4a4cffe3eee0543e5b94c90821d39e03b81d29.camel@j-davis.com> <6d0aba397625df79bdc3ca85adc11b9e48ecb0da.camel@j-davis.com> <4118680.1595097043@sss.pgh.pa.us> <571473265c5d5309f4012855ebd2131c136073ab.camel@j-davis.com> <32871.1595121333@sss.pgh.pa.us> <88c0af01ad9ac105e424768808a214d855e29a77.camel@j-davis.com> <20200720004827.4c46ikcdrfum6xyu@development> Comments: In-reply-to Tomas Vondra message dated "Mon, 20 Jul 2020 02:48:27 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <400616.1595251041.1@sss.pgh.pa.us> Date: Mon, 20 Jul 2020 09:17:21 -0400 Message-ID: <400617.1595251041@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > There's a minor problem here, though - these stats were collected before > we fixed the tlist issue, so hashagg was spilling about 10x the amount > of data compared to sort+groupagg. So maybe that's the first thing we > should do, before contemplating changes to the costing - collecting > fresh data. I can do that, if needed. +1. I'm not sure if we still need to do anything, but we definitely can't tell on the basis of data that doesn't reliably reflect what the code does now. regards, tom lane