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 1oVA9l-0002UJ-67 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Sep 2022 11:20:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVA9j-0007Di-4V for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Sep 2022 11:20:43 +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 1oVA9i-0007DZ-5h for pgsql-hackers@lists.postgresql.org; Mon, 05 Sep 2022 11:20:42 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oVA9b-0003fY-1T for pgsql-hackers@lists.postgresql.org; Mon, 05 Sep 2022 11:20:40 +0000 Received: by mail-io1-xd2a.google.com with SMTP id p187so6603945iod.8 for ; Mon, 05 Sep 2022 04:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=/D0UKSecWl1yllS02hS0UKNm4QO4hJ/GAZ5INHkzH/E=; b=Lb4H/44Db76o448n+m/Qw9k0uP6jD1J6GWDSdhmaVEJpVrSxwZVhF95VJamrhhaxqD +uwCmgfimhQdxV7C6KT/8rOQ254icKZODEYlQCOEsfV8AxiX1G++TZQt4y/oUkW1TOxo /adrYq0YF2xRzboFnfF+JT3wLCQYxtmq+9WgkiGiT0PkZ7WxVhFDOFHiZLnnLEZqcYOs vqoB3pj3OVVXt8Y+doXsAm6FV7Vr1WFjlJ2lIwPA2U2krQ+QTaKsfW4OxC+ub7ADXJUf FwMDYqIe37OnJo7qPz/5cBJYRT9KX4XYXucPKslKXieNvKw8rzN5WZLs3SiFuXdDQ5RJ b98Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=/D0UKSecWl1yllS02hS0UKNm4QO4hJ/GAZ5INHkzH/E=; b=DVaAkApUwwOqKbEhwdA39fj71a5JwilPZ49pCfl2Q13Ai1t9NH2Plt7QWu5w8biRjr rMoQstFSunjgpZLBzsVeI2JfUuhuC004Pf4ikR9INH1aUVB+smgRuzusw5A8a7znG3PA IALbz/1FHaCMzIDy1OYPnjV0Ee/o9FAsixe45t2ohyOsEzRXEdoRUhhG5ieWftp74zAx ANRQAIM0lGj7PIxgq/lOu51tjlORv2kV2zRWP2CM9mpEq/P5NbR/v36+NCt76CMSTcia iXlaUr+c/cl/dOXyiRsnxi/TeWgk8YnT4QZS17BSwpTrClEUABPqy74oTYsmn8++tGTK oRgQ== X-Gm-Message-State: ACgBeo3XeU6lNlYT5ZTbmgO6tX5whx7CQ/qkBKgofuYJ+NLTRfEnLEzs j2228FFqWWhDdS4glz6N7RHR8w== X-Google-Smtp-Source: AA6agR7AZyiZxccMbECniglGZ88nd3LF2Nn23+gtSi409uIVTHkfp1n88/beOd1D63dnpPrXbIJ5aQ== X-Received: by 2002:a05:6638:d45:b0:343:2ae6:e39a with SMTP id d5-20020a0566380d4500b003432ae6e39amr26188231jak.139.1662376833407; Mon, 05 Sep 2022 04:20:33 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id t6-20020a92d146000000b002eb09a4f803sm3811924ilg.67.2022.09.05.04.20.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Sep 2022 04:20:32 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 79C41800C98; Mon, 5 Sep 2022 06:20:31 -0500 (CDT) Date: Mon, 5 Sep 2022 06:20:31 -0500 From: Justin Pryzby To: "David G. Johnston" Cc: Nikolay Samokhvalov , pgsql-hackers@lists.postgresql.org Subject: Re: explain_regress, explain(MACHINE), and default to explain(BUFFERS) (was: BUFFERS enabled by default in EXPLAIN (ANALYZE)) Message-ID: <20220905112031.GF31833@telsasoft.com> References: <20211115190954.GO17618@telsasoft.com> <20211202005820.GJ17618@telsasoft.com> <20220124173548.GV23027@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jfWagoTHmfL/c8Ax" 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: Archived-At: Precedence: bulk --jfWagoTHmfL/c8Ax Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 26, 2022 at 03:38:53PM -0700, David G. Johnston wrote: > On Mon, Jan 24, 2022 at 9:54 AM Justin Pryzby wrote: > > > Unfortunately, "COSTS OFF" breaks postgres_fdw remote_estimate. If specifying > > > "COSTS ON" in postgres_fdw.c is considered to be a poor fix , then I suppose > > > this patch series could do as suggested and enable buffers by default only when > > > ANALYZE is specified. Then postgres_fdw is not affected, and the > > > explain_regress GUC is optional: instead, we'd need to specify BUFFERS OFF in > > > ~100 regression tests which use EXPLAIN ANALYZE. > > I'm not following the transition from the prior sentences about COSTS to > this one regarding BUFFERS. In this patch, SET explain_regress=on changes to defaults to explain(COSTS OFF), so postgres_fdw now explicitly uses COSTS ON. The patch also changes default to (BUFFERS OFF), which is what allows enabling buffers by default. I think I was just saying that the enabling buffers by default depends on somehow disabling it in regression tests (preferably not by adding 100 instances of "BUFFERS OFF"). > The following change in the machine commit seems out-of-place; are we > fixing a bug here? > > explain.c: > /* Show buffer usage in planning */ > - if (bufusage) > + if (bufusage && es->buffers) I think that was an extraneous change, maybe from a conflict while re-ordering the patches. Removed it and rebased. Thanks for looking. -- Justin --jfWagoTHmfL/c8Ax Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Add-GUC-explain_regress.patch"