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 1joWCr-0003tk-Gd for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2020 18:02:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joWCq-0000rc-FJ for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2020 18:02:36 +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 1joWCq-0000p1-7n for pgsql-hackers@lists.postgresql.org; Thu, 25 Jun 2020 18:02:36 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1joWCo-0000Uy-8q for pgsql-hackers@postgresql.org; Thu, 25 Jun 2020 18:02:35 +0000 Received: by mail-pf1-x42c.google.com with SMTP id j1so3381494pfe.4 for ; Thu, 25 Jun 2020 11:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=nJj0+Gbe4uNfQ9lpPcbwfC8ECauHPOKEhgahOAJc03U=; b=hsTeMVEeegAepewlrUUVkWYKePw4Pcl12oos2S1ounUSKWOWMrKl1uRzDP4BiEKQ2H qcJDam0IZNjlp7Ua1ePV3AuhlZceI1PCW8J+j1+MOGwVLLQCxEKXYmbaANFxPdWH/zi3 n9l4Z/QB2a7YpPZL3ZwBzIB89mP2/ZfS1v2qS40Jm42kGfMZ6jK7JU7+3aF6g7+myebP i9gGbLgMM7rKk+rme5qqvGQTz1k6IlxD7QORTvT83WxzFgjizfKTJMPTdTeDnPiGTBSM d2w+EEvOh/i9312XDoqQtIX6+dzEposJu1RQxX+Ep7ydO+IwgDeD+rdma+yrUsfNWRzR uBVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=nJj0+Gbe4uNfQ9lpPcbwfC8ECauHPOKEhgahOAJc03U=; b=sMEAxfP/VNqDH4w+9m0ENtLAvrEgBAAPRIq9uWLE7NRs6bDY0uGoXgO/9j5MXp7Z2t YIzmItW/zLO12iJ/RUXgHmcskDW0iVKRKwIcvR7g7st8MFASEdJsW97kw/y2lD/1YGDD GvX4A1aDYxNN1uyceJoUpkMAa+vUhd0+D8gpzJJCOyvxqdl7Q9j5ESCYz+sOTLa9zkVQ 3dUB61MJ5/T550xpu/EZFU4FsZY7Nmx2e0fzt2ffOqT4KgcOcR7ejYKoXQ309NpEJqIB 5TByrYPKGkqwV/aU4B4xzkjbDc7jzJmvZn5TBASwxXUrNhxiPEk8Z38nOg0cMWbbvC1G rIjw== X-Gm-Message-State: AOAM531EH7CoDqRATdTwQtezd7TQksOw1kkzOEqMvX1eEw/BfWWGU/kC dcsk1PvQU+cKzfeVie8QBrojhw== X-Google-Smtp-Source: ABdhPJzjHhl3Gfd8CDxa0ECCUl8diqSmnqauGLrxj/9vaIie04MuEKqPtzAtd+gD+2VJlWurIFlfew== X-Received: by 2002:a62:8096:: with SMTP id j144mr12722611pfd.78.1593108152967; Thu, 25 Jun 2020 11:02:32 -0700 (PDT) Received: from jdavis.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id s22sm15086707pgv.43.2020.06.25.11.02.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jun 2020 11:02:32 -0700 (PDT) Message-ID: <8fd82a9e6c00b73191d18940b2da6a94a30477af.camel@j-davis.com> Subject: Re: Default setting for enable_hashagg_disk From: Jeff Davis To: Bruce Momjian , Robert Haas Cc: Andres Freund , David Rowley , Justin Pryzby , Melanie Plageman , Tomas Vondra , "pgsql-hackers@postgresql.org" Date: Thu, 25 Jun 2020 11:02:30 -0700 In-Reply-To: <20200625171756.GB12486@momjian.us> References: <129c8f1739957589584d9525e1d8782eae3f412f.camel@j-davis.com> <20200624090628.GA19640@momjian.us> <20200624171203.GB17842@momjian.us> <20200624191900.t4sbfk236gndwoa3@alap3.anarazel.de> <20200624231810.GB13627@momjian.us> <20200624233837.GA21436@momjian.us> <20200625171756.GB12486@momjian.us> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 2020-06-25 at 13:17 -0400, Bruce Momjian wrote: > Frankly, if it took me this long to get my head around this, I am > unclear how many people will understand this tuning feature enough to > actually use it. The way I think about it is that v13 HashAgg is much more consistent with the way we do everything else: the planner costs it (including any spilling that is expected), and the executor executes it (including any spilling that is required to obey work_mem). In earlier versions, HashAgg was weird. If we add GUCs to get that weird behavior back, then the GUCs will necessarily be weird; and therefore hard to document. I would feel more comfortable with some kind of GUC escape hatch (or two). GROUP BY is just too common, and I don't think we can ignore the potential for users experiencing a regression of some type (even if, in principle, the v13 version is better). If we have the GUCs there, then at least if someone comes to the mailing list with a problem, we can offer them a temporary solution, and have time to try to avoid the problem in a future release (tweaking estimates, cost model, defaults, etc.). One idea is to have undocumented GUCs. That way we don't have to support them forever, and we are more likely to hear problem reports. Regards, Jeff Davis