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 1k07ns-0000Rc-82 for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jul 2020 18:24:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k07nr-0002yV-4W for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jul 2020 18:24:47 +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 1k07nq-0002vc-Td for pgsql-hackers@lists.postgresql.org; Mon, 27 Jul 2020 18:24:46 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k07nm-0007FG-U3 for pgsql-hackers@postgresql.org; Mon, 27 Jul 2020 18:24:46 +0000 Received: by mail-qt1-x841.google.com with SMTP id o22so12728884qtt.13 for ; Mon, 27 Jul 2020 11:24:40 -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=5MMnaFfSsxlY62/IYzELWsNVrxa1VG5KAt59OGxQhEw=; b=e8teZSR3ZzKr3eUiivWQ0/ax/vKOp4cRMWLE71NNhXBpv93QgwRiaDdAlB9tXP1hGj yAP3rr+gB8ESz8NqeLZQ8coZL+nyuKh30ZffELA79FvIM03DeM4Hy8CwCkaxHjc2Ku+u AOsNk3BcbMKYCLXfK2bsuMwGCMIruXHN0P88kadXnvGX5AxdmVp2bgLqRawO1E1HtorT jb1QBLYnhQRcjNntVIS2Y+9+iKIsLtL5EzuNa3luz10RcqEXdH3syh/xQ8aHMYHTasGv gU/iK/+EtPxCw036dxSfdNNvmBCEyead1fMyF9gvsslWg+zIVU90OItaq32tOc5MSy+a DB6w== 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=5MMnaFfSsxlY62/IYzELWsNVrxa1VG5KAt59OGxQhEw=; b=VkNFl3DStgHxsXtQL00LQeoYJPi0jm3n5YbjOpBuJSJFXtoadUKfIup9KingP0wvBM dUeubXpjQyu3EHqneGnDumaxZM+G12g+mgx0ufPTniBun1+OWJY8OhPCeP45ovuoNJWg /TX9L5+UtIMb1M52APCtawhmi1ezLnXDJsA2CLnA/QhiXdbxBa2IEvsaKIfUGjvq22M5 isafFEn9NzG4ovpkeAThC2sFhMQe2lggaQ8yW71ku6G15Y9fsX5R5IVmBlJ8Y701z/TJ lCW4Zw9xbKiUF7SdzqNwXREuObG4Z/lItFv3MiDgSQHGhej16xj2aE94cFLMC6EmpxfR 1p2Q== X-Gm-Message-State: AOAM531SiGAPbEPcuyncjxrHn9kMVVxdxXKIwNOgqcPaCUUIB/8VAEQc mwxXiy7ERXmYeQxUnRu4dbkNEA== X-Google-Smtp-Source: ABdhPJwMLUgQ22YDu/6GjQaYFfgFIMcWKBD8JX5EGry8AJw/mPwQ9DDpXhV51fKnsJ0eZkUMK3NpgQ== X-Received: by 2002:aed:34e2:: with SMTP id x89mr22714870qtd.313.1595874279387; Mon, 27 Jul 2020 11:24:39 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id 205sm19508198qkn.104.2020.07.27.11.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 11:24:38 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 7C3C82A1E6E; Mon, 27 Jul 2020 14:24:36 -0400 (-04) Date: Mon, 27 Jul 2020 14:24:36 -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: <20200727182436.GA20148@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: > On Mon, Jul 27, 2020 at 10:30 AM Alvaro Herrera > wrote: > > On 2020-Jul-23, Peter Geoghegan wrote: > > I notice you put the prototype for get_hash_mem in nodeHash.h. This > > would be fine if not for the fact that optimizer needs to call the > > function too, which means now optimizer have to include executor headers > > -- not a great thing. I'd move the prototype elsewhere to avoid this, > > and I think miscadmin.h is a decent place for the prototype, next to > > work_mem and m_w_m. > > The location of get_hash_mem() is awkward, Yes. > but there is no obvious alternative. Agreed. > Are you proposing that I just put the prototype in miscadmin.h, while > leaving the implementation where it is (in nodeHash.c)? Yes, that's in the part of my reply you didn't quote: : It remains strange to have the function in executor : implementation, but I don't offhand see a better place, so maybe it's : okay where it is. > [...] moving the implementation of get_hash_mem() to either of those > two files seems worse to me. Sure. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services