Aug - Oct 2026

8 commits
Don't reprocess PHV copies within outer aggregates' arguments
6 Oct 2026Richard GuomasterunreleasedREL_19_STABLE19rc1REL_18_STABLE18.7REL_17_STABLE17.12REL_16_STABLE16.16
LLM analysis, 100% suremodified before commitlight changesfrom patchset #721 of 1 reviewer saw the final version

Preserves the skipPHVs implementation from #72 in subselect.c, with revised comments and commit text. The committed tests remove the GROUPING case and simplify the aggregate query.

  • Richard Guosaw the final versiontrailerRichard endorsed the PHV-skipping logic in #73 and committed the final version.
Prevent self-join elimination when RTEs' checkAsUser fields differ.
29 Sep 2026Tom LanemasterunreleasedREL_19_STABLE19rc1REL_18_STABLE18.7
LLM analysis, 97% surelanded as postedfrom patchset #691 of 1 reviewer saw the final version

Matches the checkAsUser grouping and row-security tests in #69; differences reflect the target baseline's allocation code and numeric InitPlan labels.

  • Ayush Tiwarisaw the final versiontrailerAyush explicitly reviewed the checkAsUser grouping, including its unset case, and gave an LGTM in #70.
Fix join removal when Vars reference the removed join via its alias
19 Sep 2026Richard GuomasterunreleasedREL_19_STABLE19beta4REL_18_STABLE18.7REL_17_STABLE17.12REL_16_STABLE16.16
LLM analysis, 100% suremodified before commitlight changesfrom patchset #581 of 1 reviewer saw the final version

The rewriteManip.c change matches #58; the regression query changes to EXPLAIN VERBOSE and gains the corresponding output, as agreed in #60.

  • Tom Lanesaw the final versiontrailerTom examined the varnosyn rationale and requested deparser-visible regression output in #59, which Richard adopted.
Fix preprocessing of PHV copies pushed down into subqueries
19 Sep 2026Richard GuomasterunreleasedREL_19_STABLE19beta4REL_18_STABLE18.7REL_17_STABLE17.12REL_16_STABLE16.16
LLM analysis, 100% suremodified before commitlight changesfrom patchset #540 of 2 reviewers saw the final version

The planner.c, subselect.c and var.c changes match #54. The commit additionally tests PHV copies in appendrel translated_vars, following #57.

  • Fujii Masaosaw an earlier versionLLM analysis, 97% sureFujii confirmed two failures in the preceding PHV implementation in #52 and supplied the appendrel reproducer in #55 that became an additional committed test.
  • Haibo Yansaw an earlier versionLLM analysis, 93% sureHaibo reproduced and bisected alias-generated PHV failures and analyzed their preprocessing-order cause in #61, which Richard confirmed this fix addressed in #62.
Fix stale copies of PHVs in subqueries
14 Sep 2026Richard GuomasterunreleasedREL_19_STABLE19beta4REL_18_STABLE18.7REL_17_STABLE17.12REL_16_STABLE16.16
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #490 of 1 reviewer saw the final version

Uses #49, but var.c narrows shallow-copy handling from every positive phlevelsup to PHVs exactly at the target level with positive sublevels_up, allowing recursion into other PHVs.

  • Tom Lanesaw an earlier versiontrailerTom drove the owning-level preprocessing design in #46 and #48 and approved #49 in #50, before the committed var.c condition was narrowed.
Remove quals made redundant by reducing outer joins to antijoins
2 Sep 2026Richard GuomasterunreleasedREL_19_STABLE19beta4REL_18_STABLE18.7REL_17_STABLE17.12REL_16_STABLE16.16
LLM analysis, 100% suremodified before commitlight changesfrom patchset #421 of 1 reviewer saw the final version

The implementation matches #42; the commit changes the initial test's join condition, adds full-join reduction tests, and edits the commit explanation.

  • Tom Lanesaw the final versiontrailerTom supplied naming, list-handling and commentary corrections in #41 and explicitly approved the revised patch in #43.
Update .abi-compliance-history for join removal fix.
28 Aug 2026Tom LaneREL_18_STABLE18.7REL_17_STABLE17.12REL_16_STABLE16.16
LLM analysis, 100% surewritten from the discussion, no matching patch0 of 3 reviewers saw the final version

Only .abi-compliance-history changes, recording the join-removal API break discussed in #16; no indexed attachment contains this file.

  • Richard Guosaw an earlier versiontrailerRichard reviewed the underlying rewrite in #14 and #27, but the thread shows no separate review of the ABI-history entry or the final thread patchset.
  • Thom Brownsaw an earlier versiontrailerThom tested the underlying rewrite in #5 and #10, with no separate review of the ABI-history entry or the final thread patchset.
  • Jacob Brazealsaw an earlier versiontrailerJacob reported successful testing of the underlying rewrite in #8, with no separate review of the ABI-history entry or the final thread patchset.
Perform join removal by editing the query's jointree.
28 Aug 2026Tom LanemasterunreleasedREL_19_STABLE19beta4REL_18_STABLE18.7REL_17_STABLE17.12REL_16_STABLE16.16
LLM analysis, 97% surepart of a posted patchsetsignificant changesfrom patchset #251 of 3 reviewers saw the final version

Despite its canonical designation in the index, the supplied commit is on REL_16_STABLE and carries the outer-join/semijoin portions of #25, omitting SJE and much external dead-code removal. It incorporates securityQuals cleanup from #28 and the initialization compromise agreed in #29 and #30.

  • Richard Guosaw the final versiontrailerRichard reviewed the rewrite, supplied the final corrective deltas in #27 and #28, and agreed to the final initialization and assertion choices in #30.
  • Thom Brownsaw an earlier versiontrailerThom exposed qualifier-scope failures and planning regressions in #5 and successfully retested #7 in #10, before batching and later correctness changes.
  • Jacob Brazealsaw an earlier versiontrailerJacob confirmed that #7 fixed his known failure cases in #8, before subsequent batching and correctness changes.

Credits across 8 commits

Author
Richard Guo4
Tom Lane3
Ayush Tiwari1
Reviewer
Richard Guo3
Tom Lane3
Jacob Brazeal2
Thom Brown2
Ayush Tiwari1
Reported by
Orestis Markou2
Tender Wang2
Fujii Masao1
Yonghwa Lee1
Committer
Richard Guo5
Tom Lane3