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 1jMbsM-0003Mw-4z for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2020 18:26:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jMbsJ-0000Tn-Vn for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2020 18:26:03 +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 1jMbsJ-0000Tf-JH for pgsql-hackers@lists.postgresql.org; Thu, 09 Apr 2020 18:26:03 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jMbsH-0007OQ-8o for pgsql-hackers@postgresql.org; Thu, 09 Apr 2020 18:26:03 +0000 Received: by mail-pg1-x52b.google.com with SMTP id g32so5346474pgb.6 for ; Thu, 09 Apr 2020 11:26:01 -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=hAUOBfkTRRIYhAKz2dDBWrgM0cQHmnNCYqi1TraPxUQ=; b=NM+Wx6A7JWmB0sc2MmkPY5McyFDSQPgu3pYk9HyhARyvi07bEN9UCZ4DoDAmuJ9yIJ k/QtVTahQlvBUWiZVDiv/u+BxWktEMeOg2U2mq86GW3xQmi9FUHzDFjphAomGkF9YTTl khozP+ie+uIndbeK0sItmU5okU/4Q8rbMLl4wBDswGOQJCyBPX5906vz4FAxaIQP589F JNiAFbMlimVLlCGRK/9agiKbG1K1h2TGvhlWs1i57fhT9EDeMFqXyYtOylQSDMsefIsH PmtUFJxg9hAsRCcZ6MP/TPOI9rTXR3TBob2idP07A2Xa+xogUErxZsypiw5PlPuHclJR n+Hw== 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=hAUOBfkTRRIYhAKz2dDBWrgM0cQHmnNCYqi1TraPxUQ=; b=qvk4KPl0Hbj6PXYd9gS2o9kbBfGhvItiMeYoSMta4oWuvqcsNj4qm/DuUar1vXS7A5 eJEWIrk7vwqjEcls5DGi6KC5ebO/ikzN2s3NX2/uZ5js1CvSmc4bk7/hldhLf6jKhJmj F8a3/mPfl8PHnqlLoYT8bfuMPQBCw8lWRahhcYvktdNQ79hHwbf7zQjhhMP0NamIXYsH WAfOlP/aI2Xk54bfLZ1IYrG8EPhcbt5TjbFtHdVUTUKISbUxe46ldTd+W3iGWVNBXgEb M23h8pN3xH3c8To3nkY2KoFuPy3hLUbV8kqEfb/6c7wXzEKkVZ/FSZrbiOqA/AOIFQ13 Z9mA== X-Gm-Message-State: AGi0Pub4ZECp2YyScIRWz8dnSgtXttG9xD6BhXyfGaMK9llOKqZFJ6zf ruZQzPcmDCpcXnySjM8F1N+ZWg== X-Google-Smtp-Source: APiQypL/9qfwmChilNR/rAUttf3hqZ0hkt9Z5KdMhtIuIlbckmIIGnwnelwZbdBJ/c5Gu4KVe8qUNw== X-Received: by 2002:a63:3283:: with SMTP id y125mr713320pgy.423.1586456759330; Thu, 09 Apr 2020 11:25:59 -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 l9sm17993830pff.16.2020.04.09.11.25.57 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Apr 2020 11:25:58 -0700 (PDT) Message-ID: Subject: Re: Default setting for enable_hashagg_disk From: Jeff Davis To: Justin Pryzby , Tomas Vondra Cc: pgsql-hackers@postgresql.org Date: Thu, 09 Apr 2020 11:25:56 -0700 In-Reply-To: <20200409172404.GR2228@telsasoft.com> References: <9d9d1e1252a52ea1bad84ea40dbebfd54e672a0f.camel@j-davis.com> <20200407223900.GT2228@telsasoft.com> <20200409114855.h4hh7e2wt77p56sv@development> <20200409172404.GR2228@telsasoft.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 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-04-09 at 12:24 -0500, Justin Pryzby wrote: > Also.. there's no such thing as enable_groupagg? Unless I've been > missing out > on something. I thought about adding that, and went so far as to make a patch. But it didn't seem right to me -- the grouping isn't what takes the time, it's the sorting. So what would the point of such a GUC be? To disable GroupAgg when the input data is already sorted? Or a strange way to disable Sort? > Because HashAgg plans which used to run fine (because they weren't > prevented > from overflowing work_mem) might now run poorly after spilling to > disk (because > of overflowing work_mem). It's probably worth a mention in the release notes, but I wouldn't word it too strongly. Typically the performance difference is not a lot if the workload still fits in system memory. Regards, Jeff Davis