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 1jxAYR-0005xW-C8 for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Jul 2020 14:44:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jxAXt-0006qo-Cp for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Jul 2020 14:44:05 +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 1jxAXt-0006qh-5v for pgsql-hackers@lists.postgresql.org; Sun, 19 Jul 2020 14:44:05 +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 1jxAXp-0003XX-1t for pgsql-hackers@postgresql.org; Sun, 19 Jul 2020 14:44:02 +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 06JEhnTx067515; Sun, 19 Jul 2020 10:43:50 -0400 From: Tom Lane To: Stephen Frost cc: Jeff Davis , Peter Geoghegan , Alvaro Herrera , David Rowley , 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: <20200719113837.GF12375@tamriel.snowman.net> 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> <20200719113837.GF12375@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Sun, 19 Jul 2020 07:38:37 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <67513.1595169829.1@sss.pgh.pa.us> Date: Sun, 19 Jul 2020 10:43:49 -0400 Message-ID: <67514.1595169829@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > In other words, if we'd stop trying to shoehorn something in, which > we're doing because we're in beta, we'd very likely be talking about all > of this in a very different way and probably be contemplating something > like a query_mem that provides for an overall memory limit and which > favors memory for hashing over memory for sorting, etc. Even if we were at the start of the dev cycle rather than its end, I'm not sure I agree. Yes, replacing work_mem with some more-holistic approach would be great. But that's a research project, one that we can't be sure will yield fruit on any particular schedule. (Seeing that we've understood this to be a problem for *decades*, I would tend to bet on a longer not shorter time frame for a solution.) I think that if we are worried about hashagg-spill behavior in the near term, we have to have some fix that's not conditional on solving that very large problem. The only other practical alternative is "do nothing for v13", and I agree with the camp that doesn't like that. regards, tom lane