Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u0DGv-00EXm5-7q for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Apr 2025 05:37:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u0DGu-003IAo-0e for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Apr 2025 05:37:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u0DDm-003EhK-4g for pgsql-hackers@lists.postgresql.org; Thu, 03 Apr 2025 05:34:34 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u0DDj-0036Bw-2v for pgsql-hackers@lists.postgresql.org; Thu, 03 Apr 2025 05:34:33 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id CCE81612A9; Thu, 3 Apr 2025 14:34:27 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 03 Apr 2025 14:34:27 +0900 From: torikoshia To: Sadeq Dousti Cc: pgsql-hackers@lists.postgresql.org, Sergey Dudoladov Subject: Re: RFC: Logging plan of the running query In-Reply-To: References: <2aedcb5e8120bfdee994775e660f8718@oss.nttdata.com> <174144854199.294105.9417032645816235284.pgcf@coridan.postgresql.org> <784224198089cbe3cc3825332f195475@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-04-01 03:51, Sadeq Dousti wrote: > Hi, > > Sergey and I reviewed this patch and have a few comments, listed > below. Thanks for your review! >> BTW the patch adds about 400 lines to explain.c and it may be better >> to split the file as well as 9173e8b6046, but I leave it as it is > for >> now. > > 1. As rightfully described by the OP above, explain.c has grown too > big. In addition, explain.h is added to quite a number of other files. Agreed. > > 2. We wanted to entertain the possibility of a GUC variable to enable > the feature. That is, having it disabled by default, and the DBA can > selectively enable it on the fly. The reasoning is that it can affect > some workloads in an unforeseen way, so this choice can make the next > Postgres release safer. In future releases, we can make the default > "enabled", assuming enough real-world scenarios have proven the > feature safe (i.e., not affecting the DB performance noticeably). Agreed. > 3. In the email thread for this patch, we saw some attempts to measure > the performance overhead of the feature. We suggest a more rigorous > study, including memory overhead in addition to time overhead. We came > to the conclusion that analytical workloads - with complicated query > plans - and a high query rate are the best to attempt such benchmarks. Agreed. > 4. In PGConf EU 2024, there was a talk by Rafael Castro titled > "Debugging active queries" [1], and he also submitted a recent patch > titled "Proposal: Progressive explain" [2]. We see a lot of > similarities in the idea behind that patch and this one, and would > like to suggest joining forces for an ideal outcome. As we have been discussing in this thread recently, I believe that since this patch has a narrower scope, it makes sense to complete it first and then extend it to support progress tracking in a step-by-step manner. -- Regards, -- Atsushi Torikoshi Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.