Jan 2023

1 commit
Don't presort ORDER BY/DISTINCT Aggrefs with volatile functions
17 Jan 2023David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surewritten from the discussion, no matching patch3 of 3 reviewers saw the final version

No attachment implements this fix; #66 reports the volatile-expression failure, #68 proposes excluding volatile aggregate sort keys, and #72 explains the correctness requirement. The commit adds has_volatile_pathkey in planner.c and regression coverage, with the push confirmed in #73.

  • Dean Rasheedsaw the final versionLLM analysis, 100% sureReported the failure in #66 and endorsed the chosen fix with a multiple-aggregate correctness example in #72, before the commit.
  • Richard Guosaw the final versionLLM analysis, 94% sureConfirmed the missing-targetlist failure in #67 and traced separate volatile evaluations and cast-dependent behavior in #71 before the fix landed.
  • Tom Lanesaw the final versionLLM analysis, 90% sureIdentified the existing volatile-pathkey restrictions in equivclass.c as relevant to the proposed fix in #69.

Dec 2022

2 commits
Add enable_presorted_aggregate GUC
20 Dec 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #64

Exactly matches the enable_presorted_aggregate component of #64, including config.sgml, the planner guard, GUC registration, and tests; the other two series components are excluded. Discussion of this component was moved elsewhere in #65, and no qualifying review of it appears here.

Remove pessimistic cost penalization from Incremental Sort
16 Dec 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #640 of 1 reviewer saw the final version

Exactly matches the incremental-sort component of #64, removing the 1.5 multiplier in costsize.c and revising path generation in allpaths.c and planner.c. The isolation-test prerequisite and GUC component are outside this commit.

  • Richard Guosaw an earlier versiontrailerIn #60, identified unnecessary full-sort candidates and suggested extending the cleanup to partial aggregation; subsequent versions changed that logic and broadened the implementation.

Aug 2022

1 commit
Fix hypothetical problem passing the wrong GROUP BY pathkeys
17 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surewritten from the discussion, no matching patch1 of 1 reviewer saw the final version

Justin Pryzby identified the shadowing group_pathkeys declaration inline in #51, without an attached patch. The commit deletes that declaration and adjacent blank lines in planner.c, exactly as David Rowley describes in #52.

  • Justin Pryzbysaw the final versionLLM analysis, 100% sureLocated the overlooked group_pathkeys declaration and supplied the compiler shadow warning in #51, directly identifying the line removed by the fix.

Aug 2022

2 commits
Remove unused fields from ExprEvalStep
2 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #491 of 1 reviewer saw the final version

Uses the two field removals from #49 in src/include/executor/execExpr.h and additionally removes the unused transno field. David Rowley explicitly describes that extra cleanup in #50.

  • David Rowleysaw the final versioncommittercommitted the patch
Improve performance of ORDER BY / DISTINCT aggregates
2 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #372 of 5 reviewers saw the final version

Preserves the planner, executor, and LLVM implementation from #37, with comment/style cleanup, typed node accessors, explicit aggpresorted initialization, and a catalog-version bump. Test changes include temporary fdw_tuple_cost adjustment and revised tuplesort plans after the separately landed merge-join improvement, as explained in #45.

  • Ronan Dunklausaw an earlier versiontrailerBenchmarked the initial implementation, questioned ordering selection, found redundant grouping keys, and investigated FDW plan changes in #6, #21, #25, and #28, before substantial later planner and DISTINCT/JIT work.
  • James Colemansaw an earlier versiontrailerReviewed ordering selection and identified the lost merge-join ordering and incremental-sort opportunity in #11, before the selection algorithm and DISTINCT/JIT integration changed.
  • Ranier Vilelasaw an earlier versiontrailerReviewed argument initialization and proposed narrower variable scopes in #16, with follow-up on #17 in #18, before substantial subsequent changes.
  • Richard Guosaw the final versiontrailerFound the missed weaker-compatible-pathkeys case in #36, verified its correction in #39, and endorsed the revised planner work in #42.
  • Tom Lanesaw the final versiontrailerReviewed #37 in #44, requesting explicit aggpresorted initialization and clearer separation of regression-plan changes, which were addressed before commit.

Credits across 6 commits

Author
David Rowley2 LLM3
Zhihong YuLLM1
Reviewer
Richard Guo2
David Rowleycommitter1
James Coleman1
Ranier Vilela1
Ronan Dunklau1
Tom Lane1
Reported by
Dean Rasheed1
Justin Pryzby1
Pavel Luzanov1
Zhihong Yu1
Committer
David Rowley6

N LLM means N of the credits come from LLM analysis, not from commit trailers.