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 1k09Ax-0003Xf-NQ for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jul 2020 19:52:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k09Av-0003Zx-BK for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jul 2020 19:52:41 +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 1k09Av-0003WQ-19 for pgsql-hackers@lists.postgresql.org; Mon, 27 Jul 2020 19:52:41 +0000 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k09Ar-00005D-F8 for pgsql-hackers@postgresql.org; Mon, 27 Jul 2020 19:52:39 +0000 Received: by mail-qv1-xf44.google.com with SMTP id o2so8055658qvk.6 for ; Mon, 27 Jul 2020 12:52:37 -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=y6IcgY+9totHRWZHLLWgMaTnqocLRAr/l6CBBGRFOx4=; b=I/IonIHWJcOsNAQX/vYTJGIUkh9dHAM7kbShRvQpcMzirSyNzbzpxh8XGaMTt7sngn xKL24ZW87sbd+cjuR9y7h8st3u94hfiZObOKNhrighZbbKfdZ0qXaXqjJ06VR2B5xB9F LOCcugrt2Rirf9P8dPWBRF3x6mCCQx0xb5uPXIEENZ3oBA+NQ/K5XDtPfxZWAx3piOYh t8jel8OrdLkpBQ+Ye161Er8xEQG+MioElmu7TaC/jIa0ShXSBFCGUBjl/ikIEIFd2Fyy Z3DDLWu93qrJYwEC4ifoaRrg5s8Gw68HTl/ywrUwmYVS3KYYBu60PJ3sBM2nqys5b5mo MI/g== 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=y6IcgY+9totHRWZHLLWgMaTnqocLRAr/l6CBBGRFOx4=; b=knT4yLEnNMFRr4G4eD7jBl3Miaj1rQHMoDZtvBop7kDuXQAq7OXzh3V3TV1bAAEFhP pko3/2L2x5RWThxxdkZ9eRF/uW85MhMH2bzOxFGXHdGLP9oStLCOnTeKAAzqcg1dLE8w q+cvDzhQ6jK43VDIlvQGLaXEp9B0wXDpD+JcguuCoynHeM66oQ1LTNxm45EqNF7o3wp1 Wv5l8tDfH9k2X4R8kMXTjvlPZP32nu9eojhnD9r64QD+SYmC4DSkK9DQRfan9u6NaTsX VUFjL7cHnN3xrX6fF/ozX1p/HKj1nPlfwsJ/FvzmQDPKwZonmimrxW5Y5Ky0TOJypAfG IQjw== X-Gm-Message-State: AOAM532A7uwBdSBDEfodE1dSUMVhtby/zuPBFACbrvsaTVITMPuETd0s zS5CIlmtmwV/kohKrxC5O9t8tw== X-Google-Smtp-Source: ABdhPJzLz81OSIc8cv07rmgv1oGDwNookyBySgdADjoztQCAhnvkdKDwDcVgu+e05YfilnbMCsR8QQ== X-Received: by 2002:ad4:46ea:: with SMTP id h10mr24637691qvw.145.1595879555448; Mon, 27 Jul 2020 12:52:35 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id a21sm6026465qkg.54.2020.07.27.12.52.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 12:52:34 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 72CAD2A1E6E; Mon, 27 Jul 2020 15:52:32 -0400 (-04) Date: Mon, 27 Jul 2020 15:52:32 -0400 From: Alvaro Herrera To: Peter Geoghegan Cc: Jeff Davis , David Rowley , Stephen Frost , Tom Lane , Andres Freund , Bruce Momjian , Robert Haas , Justin Pryzby , Melanie Plageman , Tomas Vondra , "pgsql-hackers@postgresql.org" Subject: Re: Default setting for enable_hashagg_disk Message-ID: <20200727195232.GA22546@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-27, Peter Geoghegan wrote: > The v4-0001-Remove-hashagg_avoid_disk_plan-GUC.patch changes are > surprisingly complicated. It would be nice if you could take a look at > that aspect (or confirm that it's included in your review). I think you mean "it replaces surprisingly complicated code with straightforward code". Right? Because in the previous code, there was a lot of effort going into deciding whether the path needed to be generated; the new code just generates the path always. Similarly the code to decide allow_hash in create_distinct_path, which used to be nontrivial, could (if you wanted) be simplified down to a single boolean condition. Previously, it was nontrivial only because it needed to consider memory usage -- not anymore. But maybe you're talking about something more subtle that I'm just too blind to see. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services