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 1ju0ZE-0005Q4-R4 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 21:28:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ju0ZD-0003EH-QM for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 21:28:23 +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 1ju0ZD-0003EA-JW for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2020 21:28:23 +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 1ju0ZB-0003rC-Dh for pgsql-hackers@postgresql.org; Fri, 10 Jul 2020 21:28:22 +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 06ALSFel2164048; Fri, 10 Jul 2020 17:28:15 -0400 From: Tom Lane To: Alvaro Herrera cc: Peter Geoghegan , Stephen Frost , Jeff Davis , Andres Freund , Bruce Momjian , Robert Haas , David Rowley , Justin Pryzby , Melanie Plageman , Tomas Vondra , "pgsql-hackers@postgresql.org" Subject: Re: Default setting for enable_hashagg_disk In-reply-to: <20200710211026.GA4375@alvherre.pgsql> References: <20200710211026.GA4375@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 10 Jul 2020 17:10:26 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2164046.1594416495.1@sss.pgh.pa.us> Date: Fri, 10 Jul 2020 17:28:15 -0400 Message-ID: <2164047.1594416495@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-Jul-10, Peter Geoghegan wrote: >> * The maximum allowable value is 100.0, to protect users from >> accidentally setting hash_mem_multiplier to a value intended to work >> like a work_mem-style KB value (you can't provide an absolute value >> like that directly). This maximum is absurdly high. > I'm not sure about this bit; sounds a bit like what has been qualified > as "nannyism" elsewhere. Suppose I want to give a hash table 2GB of > memory for whatever reason. If my work_mem is default (4MB) then I > cannot possibly achieve that without altering both settings. > So I propose that maybe we do want a maximum value, but if so it should > be higher than what you propose. I think 10000 is acceptable in that it > doesn't get in the way. I was kind of thinking 1000 as the limit ;-). In any case, the code will need to internally clamp the product to not exceed whatever the work_mem physical limit is these days. regards, tom lane