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 1qmIC1-006Sgv-7H for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Sep 2023 18:26:25 +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 1qmIBz-003f9k-DL for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Sep 2023 18:26:23 +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 1qmIBz-003f9M-3F for pgsql-hackers@lists.postgresql.org; Fri, 29 Sep 2023 18:26:23 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qmIBw-008Jfx-DS for pgsql-hackers@postgresql.org; Fri, 29 Sep 2023 18:26:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=FntUY7igh3NQ5vMmmNRu6zR8/FtZh611Oy++2I/2/Qs=; b=wDj1n XMf4WSGG5HaKauqPLH+Qng7Dfs4a3zZe01077LfH3D3jkqAIZa8ht3FR2cUyip/ampsWv8xQQV4Pg aNfs6xRbBUX1JUZ/i5aK8umTrh9vOq+i6PaHS5BcSW6Cl+txjpoDcLUD5cBf4uGdMyYnvp/gYjLIP ckPlIH6rVHB7Vygr7Li8HX7KttNCVY3X9IcMNmsSoTaFEKf3C+gPqdhZTrua9IjzuObmuG9vc+ffT tLFmLagxVL/LWlFYi3LVihNNHakTQ/Fel8domuv98KDZ2qitWCuj2Ns1iFy1wyPg4emnY6OQVKuTD QStSb8PeOIXQcpnWtJbPEc1PGZ6SA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qmIBv-00Fbea-0s; Fri, 29 Sep 2023 14:26:19 -0400 Date: Fri, 29 Sep 2023 14:26:19 -0400 From: Bruce Momjian To: James Coleman Cc: Robert Haas , pgsql-hackers Subject: Re: Fix incorrect comment reference Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jan 23, 2023 at 06:42:45PM -0500, James Coleman wrote: > On Mon, Jan 23, 2023 at 4:07 PM James Coleman wrote: > > > > On Mon, Jan 23, 2023 at 3:41 PM Robert Haas wrote: > > > > > > On Mon, Jan 23, 2023 at 3:19 PM James Coleman wrote: > > > > On Mon, Jan 23, 2023 at 1:26 PM Robert Haas wrote: > > > > > On Mon, Jan 23, 2023 at 8:31 AM James Coleman wrote: > > > > > > See the attached for a simple comment fix -- the referenced > > > > > > generate_useful_gather_paths call isn't in grouping_planner it's in > > > > > > apply_scanjoin_target_to_paths. > > > > > > > > > > The intended reading of the comment is not clear. Is it telling you to > > > > > look at grouping_planner because that's where we > > > > > generate_useful_gather_paths, or is it telling you to look there to > > > > > see how we get the final target list together? If it's the former, > > > > > then your fix is correct. If the latter, it's fine as it is. > > > > > > > > > > The real answer is probably that some years ago both things happened > > > > > in that function. We've moved on from there, but I'm still not sure > > > > > what the most useful phrasing of the comment is. > > > > > > > > Yeah, almost certainly, and the comments just didn't keep up. > > > > > > > > Would you prefer something that notes both that the broader concern is > > > > happening via the grouping_planner() stage but still points to the > > > > proper callsite (so that people don't go looking for that confused)? > > > > > > I don't really have a strong view on what the best thing to do is. I > > > was just pointing out that the comment might not be quite so obviously > > > wrong as you were supposing. > > > > "Wrong" is certainly too strong; my apologies. > > > > I'm really just hoping to improve it for future readers to save them > > some confusion I had initially reading it. > > Updated patch attached. Patch applied. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.