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 1jwxwJ-0002fE-4V for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Jul 2020 01:16:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jwxvl-0008SS-Bn for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Jul 2020 01:15:53 +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 1jwxvl-0008SK-4w for pgsql-hackers@lists.postgresql.org; Sun, 19 Jul 2020 01:15:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwxvc-00011K-2t for pgsql-hackers@postgresql.org; Sun, 19 Jul 2020 01:15:49 +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 06J1FXxZ032872; Sat, 18 Jul 2020 21:15:33 -0400 From: Tom Lane To: Jeff Davis cc: Peter Geoghegan , Alvaro Herrera , David Rowley , Stephen Frost , Andres Freund , Bruce Momjian , Robert Haas , Justin Pryzby , Melanie Plageman , Tomas Vondra , "pgsql-hackers@postgresql.org" Subject: Re: Default setting for enable_hashagg_disk In-reply-to: <571473265c5d5309f4012855ebd2131c136073ab.camel@j-davis.com> 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> Comments: In-reply-to Jeff Davis message dated "Sat, 18 Jul 2020 15:04:52 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32870.1595121333.1@sss.pgh.pa.us> Date: Sat, 18 Jul 2020 21:15:33 -0400 Message-ID: <32871.1595121333@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jeff Davis writes: > What is your opinion about pessimizing the HashAgg disk costs (not > affecting HashAgg plans expected to stay in memory)? Tomas Vondra > presented some evidence that Sort had some better IO patterns in some > cases that weren't easily reflected in a principled way in the cost > model. Hm, was that in some other thread? I didn't find any such info in a quick look through this one. > That would lessen the number of changed plans, but we could easily > remove the pessimization without controversy later if it turned out to > be unnecessary, or if we further optimize HashAgg IO. Trying to improve our cost models under-the-hood seems like a perfectly reasonable activity to me. regards, tom lane