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 1pK3dn-0001JQ-0w for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jan 2023 20:42:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pK3dl-0001Bp-6L for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jan 2023 20:42:05 +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 1pK3dk-0001Bf-RR for pgsql-hackers@lists.postgresql.org; Mon, 23 Jan 2023 20:42:04 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pK3de-00050m-2M for pgsql-hackers@postgresql.org; Mon, 23 Jan 2023 20:42:04 +0000 Received: by mail-lf1-x12d.google.com with SMTP id b3so20096022lfv.2 for ; Mon, 23 Jan 2023 12:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Hkpq3UYwMMKkHHLGpGYmTr3FBvCpF2nAJsqjuLKwvgI=; b=KJKEbtmDHEORuCFQ+4wrprFUKh1PbpdOuL921nn7wHRjm1GmIYb1EOLWSMN2JAbOMT +/C9iOCN5uTvloKaFXc3L6S5/yp9CKBMU7lKsXLmASMASNu74G3/5RlF3q9yYpDVDDxr KxtcIai4CYmddljMSSWdd/N5VUkG0nlNz2c42l+DXMHLWgx7/TiF/OZKBR9NYlIt2QfJ jaDQO8Ll6kgU1HvC3uFS+qZbYMFjvHO739se6qk9glF3kx45Q8gF64b42RyW/b7cVBAi IL6HIknAIoKGSK2UbO/z0xZtTu6e4U6OcRz0nyz5Qqoi0iNCaNJGfRJfZuJmtFNY5gzT IpUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Hkpq3UYwMMKkHHLGpGYmTr3FBvCpF2nAJsqjuLKwvgI=; b=5oCtSZq+7qohRqYgtkS1JXEVm7TkJ5URH+WClB0Mjkox3HEQLwlAT5RRPZOSJZRgD0 V+4v9kXOKesFMdZE/pjyvKm+zWo1fmzHfUGKLTKnHmPke7GiR+ci614AnrALuQY9AaxT ZJjXgRsumD8y8TF6dpoQXD5hC0T3nlbcV+rWqm03r0Mb6cvSkxJXF4565O76yHIS/Cvx I/qiqWJlXwu3yOLK4+U7aKyeQShn9tBwItpKqrjZmP2Yl5XjswM13GWAc4cheNnyaKhG 42mg54O136wr6+KjV1eb2JkxbMS3JEGR/WdkcznHtY5mjNgJZydSLwqU+Y5g+hNCsfd5 r6eA== X-Gm-Message-State: AFqh2koFgsmWuxb7Q/foSBEZ8Oap3Ya36xqBuGw1qcZNFp93NwlNkyda q1aMIoPSKYCqO4bRBFNBqjsqjmOgKIPGokSpjw3bjGiB X-Google-Smtp-Source: AMrXdXuwcMVVftLdsInFwNHQUTOPfTQ9TSg7JrU3l1o0Ip8VMCwl1mocTCyT5D3JBmFm3uN/PDG9f17yYl0DuyKSM7M= X-Received: by 2002:a05:6512:1301:b0:4b5:604a:5b24 with SMTP id x1-20020a056512130100b004b5604a5b24mr1960012lfu.550.1674506516906; Mon, 23 Jan 2023 12:41:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Mon, 23 Jan 2023 15:41:45 -0500 Message-ID: Subject: Re: Fix incorrect comment reference To: James Coleman Cc: pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. -- Robert Haas EDB: http://www.enterprisedb.com