Re: Fix incorrect comment reference - Mailing list pgsql-hackers

From James Coleman
Subject Re: Fix incorrect comment reference
Date
Msg-id CAAaqYe_mqK1AWkVB7Jp5Q3RBOGDEAmeBKF3xd9sPWyHXvmr=FQ@mail.gmail.com
Whole thread Raw
In response to Re: Fix incorrect comment reference  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Fix incorrect comment reference
List pgsql-hackers
On Mon, Jan 23, 2023 at 1:26 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Mon, Jan 23, 2023 at 8:31 AM James Coleman <jtc331@gmail.com> 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)?

James Coleman



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: v16 GRANT role TO role needs a multi-option setting capability
Next
From: Andres Freund
Date:
Subject: Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?