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 1qlz32-0058UC-8o for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Sep 2023 21:59:52 +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 1qlz30-00GnLT-Qy for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Sep 2023 21:59:50 +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 1qlz30-00GnLG-GN for pgsql-hackers@lists.postgresql.org; Thu, 28 Sep 2023 21:59:50 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlz2x-008AJi-NM for pgsql-hackers@lists.postgresql.org; Thu, 28 Sep 2023 21:59:49 +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 38SLxjbh1104460; Thu, 28 Sep 2023 17:59:45 -0400 From: Tom Lane To: David Rowley cc: PostgreSQL Developers Subject: Re: Does anyone ever use OPTIMIZER_DEBUG? In-reply-to: References: Comments: In-reply-to David Rowley message dated "Fri, 29 Sep 2023 10:20:39 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1104458.1695938385.1@sss.pgh.pa.us> Date: Thu, 28 Sep 2023 17:59:45 -0400 Message-ID: <1104459.1695938385@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > In c4a1933b4 I pushed a fix for a 4 year old bug in print_path() where > I'd forgotten to add handling for TidRangePaths while working on > bb437f995. > 4 years is quite a long time for such a bug. Maybe that's because > nobody uses OPTIMIZER_DEBUG. I certainly don't, and Tom mentions [1] > he doesn't either. > Is there anyone out there who uses it? > If not, it's about 320 lines of uselessness. We could also discuss keeping the "tracing" aspect of it, but replacing debug_print_rel with pprint(rel), which'd still allow removal of all the "DEBUG SUPPORT" stuff at the bottom of allpaths.c. That's pretty much all of the maintenance-requiring stuff in it. regards, tom lane