Dec 2022

2 commits
Avoid O(N^2) cost when pulling up lots of UNION ALL subqueries.
22 Dec 2022Tom Lanemaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 99% surepart of a posted patchsetmoderate changesfrom patchset #22 of 2 reviewers saw the final version

The commit takes the optimization portion of #2, separating its recursion defenses, and incorporates Richard Guo's removal of obsolete hasSubLinks and redundant lastPHId checks #3. Its credit names Lepikhov and Tom Lane, matching the original work in #1 and Lane's revision.

  • Richard Guosaw the final versionLLM analysis, 99% sureRichard identified the obsolete hasSubLinks condition and redundant lastPHId check in #3, and both proposed cleanups appear in the committed optimization.
  • Tom Lanesaw the final versioncommittercommitted the patch
Add some recursion and looping defenses in prepjointree.c.
22 Dec 2022Tom Lanemaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1REL_15_STABLE15.2REL_14_STABLE14.7REL_13_STABLE13.10+2 more
LLM analysis, 99% surepart of a posted patchsetmoderate changesfrom patchset #2

The commit extracts miscadmin.h and the stack-depth and interrupt checks in pull_up_subqueries_recurse() from #2. It additionally checks stack depth in pull_up_sublinks_jointree_recurse() and is_simple_union_all_recurse(), leaving the optimization for a separate commit as confirmed in #7.

Credits across 2 commits

Author
Andrei LepikhovLLM1
Tom LaneLLM1
Reviewer
Tom Lanecommitter1
Committer
Tom Lane2

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