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 1joAKQ-00061G-Ue for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jun 2020 18:40:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joAKP-00024g-Ri for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jun 2020 18:40:57 +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 1joAKP-00024Z-Kv for pgsql-hackers@lists.postgresql.org; Wed, 24 Jun 2020 18:40:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joAKN-00019g-6z for pgsql-hackers@postgresql.org; Wed, 24 Jun 2020 18:40:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 05OIeoH72217146; Wed, 24 Jun 2020 14:40:50 -0400 From: Tom Lane To: Tomas Vondra cc: Justin Pryzby , Bruce Momjian , David Rowley , Jeff Davis , Robert Haas , Melanie Plageman , pgsql-hackers@postgresql.org Subject: Re: Default setting for enable_hashagg_disk In-reply-to: <20200624183203.cnqcol27ruastit7@development> References: <20200610021544.GA14879@telsasoft.com> <8bff2e4e8020c3caa16b61a46918d21b573eaf78.camel@j-davis.com> <129c8f1739957589584d9525e1d8782eae3f412f.camel@j-davis.com> <20200624090628.GA19640@momjian.us> <20200624123843.GX4107@telsasoft.com> <2214502.1593019796@sss.pgh.pa.us> <20200624183203.cnqcol27ruastit7@development> Comments: In-reply-to Tomas Vondra message dated "Wed, 24 Jun 2020 20:32:03 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2217144.1593024050.1@sss.pgh.pa.us> Date: Wed, 24 Jun 2020 14:40:50 -0400 Message-ID: <2217145.1593024050@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > On Wed, Jun 24, 2020 at 01:29:56PM -0400, Tom Lane wrote: >> If we feel we need something to let people have the v12 behavior >> back, let's have >> (1) enable_hashagg on/off --- controls planner, same as it ever was >> (2) enable_hashagg_spill on/off --- controls executor by disabling spill > What if a user specifies > enable_hashagg = on > enable_hashagg_spill = off It would probably be reasonable for the planner to behave as it did pre-v13, that is not choose hashagg if it estimates that work_mem would be exceeded. (So, okay, that means enable_hashagg_spill affects both planner and executor ... but ISTM it's just one behavior not two.) regards, tom lane