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 1jpxdG-0001pi-W3 for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2020 17:31:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jpxdF-0005gU-JU for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2020 17:31:49 +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 1jpxdF-0005gN-CM for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2020 17:31:49 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpxdC-0006xu-60 for pgsql-hackers@postgresql.org; Mon, 29 Jun 2020 17:31:48 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jpxd6-00063o-5J; Mon, 29 Jun 2020 13:31:40 -0400 Date: Mon, 29 Jun 2020 13:31:40 -0400 From: Bruce Momjian To: Peter Geoghegan Cc: Tomas Vondra , Robert Haas , Andres Freund , David Rowley , Jeff Davis , Justin Pryzby , Melanie Plageman , "pgsql-hackers@postgresql.org" Subject: Re: Default setting for enable_hashagg_disk Message-ID: <20200629173140.GE17529@momjian.us> References: <20200626144414.rftlidu34rigiulv@development> <20200626163726.GA3337@momjian.us> <20200626174513.tmnkic7q5duugvhh@development> <20200626230020.GD3337@momjian.us> <20200626235850.gvl3lpfyeobu4evi@development> <20200627104141.gq7d3hm2tvoqgjjs@development> <20200629150655.ethstxkf3bkqoown@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jun 29, 2020 at 10:20:14AM -0700, Peter Geoghegan wrote: > I have no reason to believe that the planner is any more or any less > likely to conclude that the hash table will fit in memory in v13 as > things stand (I don't know if the BufFile issue matters). > > In general, grouping estimates probably aren't very good compared to > join estimates. I imagine that in either v12 or v13 the planner is > likely to incorrectly believe that it'll all fit in memory fairly > often. v12 was much too permissive about what could happen. But v13 is > too conservative. FYI, we have improved planner statistics estimates for years, which must have affected node spill behavior on many node types (except hash_agg), and don't remember any complaints about it. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee