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 1jnO1u-0001Kq-9m for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jun 2020 15:06: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 1jnO1t-0003UM-3j for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jun 2020 15:06:37 +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 1jnO1s-0003UF-O8 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jun 2020 15:06:36 +0000 Received: from mail-io1-xd44.google.com ([2607:f8b0:4864:20::d44]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jnO1p-0000Bp-O6 for pgsql-hackers@postgresql.org; Mon, 22 Jun 2020 15:06:35 +0000 Received: by mail-io1-xd44.google.com with SMTP id i4so16779073iov.11 for ; Mon, 22 Jun 2020 08:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gRt/NPZMG1pKX5b4wSOh1EUtc+bBdvBV34kixDrNCUI=; b=r4aRYn823Zs3h25KNXDmxMxuGe8CnN8rVyPerR1aNY6xBG8UEpxEYnqHijVqErmSlj RbqegPUl50f62qN2417cv9W5lW2s59IeJruedgZEtxn1Trxzus81l71gKb06Qnw6gFiO tuOUpy32gGMMJpbnkeTUo34TJ7W2I/pg4MVcIOtVtVn0VNmPqxYwdHYqBjN2a/l6NbMs bILuLwN1AiGGDNaSozGFOCd+fBDyDNc+2NRoZSDhAHJkVQ3xCisEl3VZfJ7U730K3Bfe TH4L+JJYAjoIZSNBitntqsP2ihiw1SYDqYu4BVJj7F4HZYC6Vbcz+YqcA4IJw5QrjllW wigw== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gRt/NPZMG1pKX5b4wSOh1EUtc+bBdvBV34kixDrNCUI=; b=UnfAhUTvhSEbttaBaunU9sqYYBJCKZ9FRX5VjzzjqAvXTI/9wkjpRcPohj+rtcJZim f2rrSuu81ldcR9ACqH2S8CPcuB+ngXJYfK2X6QPuGn+d1111v8Jp/vEsYCB3l7+YafYM WE+gwF1JKO2Xy9RVDnPvE7vgBTMa7hJZslTUVSSv4Pw2dKJclTLDUENoOo9Kc4yUhYst S0LUVGtRG5A8yiAJuCOP2HHczVh5QhC6/ZMVdCYMNqyvNM/yjLarBFr4MMiyqZoTyeyF 3YlSFmQBAkepmyL8HVGdLrGdGv+xDtJ10JCl8Hj6W4bn00eK2hYAodKCadG/Me9G+94x SXCA== X-Gm-Message-State: AOAM532KkaqJPsak8wHciCCujRXm4R2o1jlikuBdw1WFP/6w3mtWyuLQ jZ2ZTy1YCSVUe2Ak02UIqVuJ+A== X-Google-Smtp-Source: ABdhPJyjqK9+R848ISzVnacX7UEX6xf/9P1F5iNV6NpeoNR12cZDrSZqhvX0KovB5YN7oCiuCwQWKQ== X-Received: by 2002:a6b:15c2:: with SMTP id 185mr7487194iov.207.1592838392888; Mon, 22 Jun 2020 08:06:32 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id s12sm4625755ilk.58.2020.06.22.08.06.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 08:06:32 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id AEF1580092E; Mon, 22 Jun 2020 10:06:30 -0500 (CDT) Date: Mon, 22 Jun 2020 10:06:30 -0500 From: Justin Pryzby To: Robert Haas Cc: Jeff Davis , Melanie Plageman , Tomas Vondra , pgsql-hackers@postgresql.org Subject: Re: Default setting for enable_hashagg_disk Message-ID: <20200622150630.GR17995@telsasoft.com> References: <9d9d1e1252a52ea1bad84ea40dbebfd54e672a0f.camel@j-davis.com> <20200407223900.GT2228@telsasoft.com> <20200409114855.h4hh7e2wt77p56sv@development> <6292f5a766198d5745eb8cc17ac736366056671d.camel@j-davis.com> <20200610021544.GA14879@telsasoft.com> <8bff2e4e8020c3caa16b61a46918d21b573eaf78.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jun 22, 2020 at 10:52:37AM -0400, Robert Haas wrote: > On Wed, Jun 10, 2020 at 2:39 PM Jeff Davis wrote: > > The behavior in v13 master is, by default, analagous to Sort or > > anything else that adapts at runtime to spill. If we had spillable > > HashAgg the whole time, we wouldn't be worried about #2 at all. But, > > out of conservatism, I am trying to accommodate users who want an > > escape hatch, at least for a release or two until users feel more > > comfortable with disk-based HashAgg. > > > > Setting enable_hash_disk=false implements 2(a). This name apparently > > causes confusion, but it's hard to come up with a better one because > > the v12 behavior has nuance that's hard to express succinctly. I don't > > think the names you suggested quite fit, but the idea to use a more > > interesting GUC value might help express the behavior. Perhaps making > > enable_hashagg a ternary "enable_hashagg=on|off|avoid_disk"? The word > > "reject" is too definite for the planner, which is working with > > imperfect information. > > > > In master, there is no explicit way to get 2(b), but you can just set > > work_mem higher in a lot of cases. If enough people want 2(b), I can > > add it easily. Perhaps hashagg_overflow=on|off, which would control > > execution time behavior? > > don't think we do, so I'm very skeptical of the idea that we need 2 > just for this feature. That doesn't feel scalable. I think the right > number is 0 or 1, and if it's 1, very few people should be changing > the default. If anything else is the case, then IMHO the feature isn't > ready to ship. This was addressed in 92c58fd94801dd5c81ee20e26c5bb71ad64552a8 https://wiki.postgresql.org/index.php?title=PostgreSQL_13_Open_Items&diff=34994&oldid=34993 -- Justin