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 1jLsqK-0001uo-5i for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 18:21:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLsqI-0000zN-NL for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 18:20:58 +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 1jLsqI-0000vY-86 for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2020 18:20:58 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jLsqA-0006de-Rv for pgsql-hackers@postgresql.org; Tue, 07 Apr 2020 18:20:56 +0000 Received: by mail-pg1-x532.google.com with SMTP id d17so2124552pgo.0 for ; Tue, 07 Apr 2020 11:20:50 -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:date:mime-version :content-transfer-encoding; bh=XA+8rPW2o6P5ri60aGyl+IWpKSeAkECA8PF1bF8emME=; b=i+mL6+E0UJcsqV9ZCzM4pTgG04Xho0hESLH8vV0JblOXME84/twkL9t0RyPiETtTTi 6+D5qzHPqGbsP4ZurAoznn+LgkhWrEGYyIyUXBRg45HNbABDoR2dgQCaNZhhKqFQalY3 ShX+jREnh2wam6PipGJblNeiDA4rKzHfiOXq1FimT4aasRvtUUdC+bAzfv9HzjJ0SSjW 0YagjV3DBO+cpQ147fF5dk668+w+zKexpLIXs2R/EEoXaX0hqe8dY43Kwz/FB1YFJRUU qdsDLGGCYLD82u+hooEcVSJKxyjg8tb2ik3nstbLpaTkGW/oiQSOKFc1a8/nvvgaalMJ XbEA== 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:date:mime-version :content-transfer-encoding; bh=XA+8rPW2o6P5ri60aGyl+IWpKSeAkECA8PF1bF8emME=; b=IjLD4YJ/tT6nATxgw20GctXl9PCYxfZJUTGW7vQUGd4BaW+4MOv981f82z4Q1AytU+ PiZrDbQ6N06Elyd004pCvFGTS+YaIv2qBTzFaToiVmEU5dwfGCfH57qQl9WNtqnZ2gcR zxt2rVzVjEN76S33kBuFlYOUW87ZqXcLT8Jf+yGOciABK41MUakFRDpBCq8fGrBOCfiE GO4zPc0WO4fTbc8nXmnJqnPWACYFQtQe1E1geeQ6UtO2UfUaOY+NLnNH2PESDgbRMa/k kbTfck//fnSduGLJBfIfSqYU3OQl5apZ4OeMtFzW/tPmulR5Q85JcMAXQYInWWUyQ79u UjEQ== X-Gm-Message-State: AGi0PuageasjTG17+IZVXveRH9nWqhK8KTVwNxDUbA2iT/AR2526WoWy aNZYqJf1DBF1u8WIP93epEdZsejfwII= X-Google-Smtp-Source: APiQypKmYPPcG1mXEuA1vJfgGo3AI77IYX07x3SZKYdIrr5zov15ErSizm1VYOT89/SzR6oXnxmWvg== X-Received: by 2002:a63:eb0f:: with SMTP id t15mr3317494pgh.25.1586283649261; Tue, 07 Apr 2020 11:20:49 -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 z6sm13713834pgg.39.2020.04.07.11.20.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 11:20:48 -0700 (PDT) Message-ID: <9d9d1e1252a52ea1bad84ea40dbebfd54e672a0f.camel@j-davis.com> Subject: Default setting for enable_hashagg_disk From: Jeff Davis To: pgsql-hackers@postgresql.org Date: Tue, 07 Apr 2020 11:20:46 -0700 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 This is just a placeholder thread for an open item that I'm adding to the Open Items list. We can make a decision later. Now that we have Disk-based Hash Aggregation, there are a lot more situations where the planner can choose HashAgg. The enable_hashagg_disk GUC, if set to true, chooses HashAgg based on costing. If false, it only generates a HashAgg path if it thinks it will fit in work_mem, similar to the old behavior (though it wlil now spill to disk if the planner was wrong about it fitting in work_mem). The current default is true. I expect this to be a win in a lot of cases, obviously. But as with any planner change, it will be wrong sometimes. We may want to be conservative and set the default to false depending on the experience during beta. I'm inclined to leave it as true for now though, because that will give us better information upon which to base any decision. Regards, Jeff Davis