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 1ju0I2-0004rQ-Vu for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 21:10:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ju0I1-00067M-UU for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2020 21:10:37 +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 1ju0I1-000650-Mx for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2020 21:10:37 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ju0Hu-000736-Hm for pgsql-hackers@postgresql.org; Fri, 10 Jul 2020 21:10:37 +0000 Received: by mail-qk1-x741.google.com with SMTP id 80so6671943qko.7 for ; Fri, 10 Jul 2020 14:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=kVFp8eEFJFwNtsilxQqZzlMC1nlL/5ilPMYrUaBQL1g=; b=KfgjJGDbsjwzZHeHqB0lR+0NZ/EwZOWgASp6+NGDfPRkg3O1ie4RGEs88+aOVsInav 8+i9rYsRRFE1rBiHFJ73JGIK2f6TqJ/9EdEZqI3XS2MZ1TMAN+QpuTK8oke720BV/E8R Bc5Y5D5FMnSCtlRPxg7v4fk9AnrchDEWHyDL4AXw+/srd+K1E2t7seGJRRYmGOmfWyQf QHFJw8rXNR3dQyVzn5oHyiU6q8loui/vMTm4cng2dAHF1zRhZr6ndSEmQON/UaLVqFYV NWMtEq5X2ka+3aqY62vtLD/kSSmP4ns/AKK41VpjGZs4OZcveQmm5l1ByMSHDrv0qElI t8jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=kVFp8eEFJFwNtsilxQqZzlMC1nlL/5ilPMYrUaBQL1g=; b=QssecsIekpzZR5V93ZNSTZxMx1h2ePUNFZpoOtJaKHEXD+2uIFcvqjrQpGLCywHI1r FHMxsfBY/IZ94xe8Gc5oMIsGMnacaloVxUSqnPzANdE5Or+mFcr7NPW/3+JxdCTji9YN ZZARGJkjpagtBvxwrtiuHdmMaJQzDet40w6NOvS1xS6/g7NbAHZKXsbr0UuHGUdrcWy2 bL+2/LT9BAIlIFQc5Xy/7k7J41g/SpxQ8pi0eX4OFNDT7KQF+7jfaIPrShLX4UA2u9+y zH4ST6AiCbHkmyavqMceI1kb13xY0IK6lw2Zp6D0ObiSfjyHTW85l8X9Z+PGRjvlhwI/ M8yg== X-Gm-Message-State: AOAM532fiRy0REw4aow7NMBHHVR0s0Mf/z0EAvvtcKWfaMMxZBWg4Xi6 nzP2pvoxzJPn2+M300OcPfBKeQ== X-Google-Smtp-Source: ABdhPJyVrQ68kMA/Z00QVBj7nHZUzZ2AttCh0y+HNszKm9Fk0JvJW7AfJIu6uMuQefCoqcZQGulajw== X-Received: by 2002:a37:c4b:: with SMTP id 72mr71946074qkm.359.1594415429048; Fri, 10 Jul 2020 14:10:29 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id g20sm9745155qtc.46.2020.07.10.14.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 14:10:27 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 423A42A38D3; Fri, 10 Jul 2020 17:10:26 -0400 (-04) Date: Fri, 10 Jul 2020 17:10:26 -0400 From: Alvaro Herrera To: Peter Geoghegan Cc: Tom Lane , 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 Message-ID: <20200710211026.GA4375@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 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 think that it's possible that a small number of users will find it > useful to set the value of hash_mem_multiplier as high as 5.0. That is > a very aggressive value, but one that could still make sense with > certain workloads. 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. Another point is that if you specify a unit for the multiplier (which is what users are likely to do for larger values), it'll fail anyway, so I'm not sure this is such terrible a problem. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services