model-writtenrun 5673 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Antonin Houska opened the thread with aggregation below base scans and joins, using GroupedVar to transport partial results; he had abandoned aggmultifn, so the design could join a grouped relation to an ordinary relation but could not join two grouped relations #1.
- An August archive submission extended the prototype to postgres_fdw, but Jeevan Chalke and Ashutosh Bapat reported crashes and explained that matching aggregate transition and result types did not guarantee interchangeable values; Ashutosh also opposed removing GetForeignUpperPaths and requested functional patch boundaries and separate grouped RelOptInfos #3 #4 #5.
- Antonin acknowledged the missing final-function checks and retained restrictions on unsupported aggregate forms and nullable outer-join sides, while Ashutosh explained that grouped and ordinary paths produce different results and therefore belong in separate RelOptInfos #7 #8 #9.
- The November prototype added path uniqueness information to avoid unnecessary final aggregation, remote sorting by aggregates, a disabled-by-default enable_agg_pushdown setting, and further regression coverage #10.
- Robert Haas identified unsafe substitutions through equivalence classes for types such as numeric and citext, reported compiler and regression failures, and reinforced the case for separate grouped RelOptInfos; subsequent discussion explored binary-equality metadata without settling an implementation #13 #14 #15 #19 #20.
- Antonin's February revision adopted separate RelOptInfos and restricted the submitted patch to core aggregation push-down, deferring postgres_fdw support and finalization avoidance until the design stabilized #21.
- An August revision temporarily narrowed the feature to simple aggregation and simple column grouping expressions, leaving two-stage and parallel aggregation for separate work #23.
- Tom Lane argued that partial aggregation was essential to useful coverage, requested a clear optimizer/README explanation, and proposed indexing grouped upper relations through reusable join-relation lookup infrastructure; Antonin agreed to restore partial aggregation while continuing to defer FDW, partitioning, and parallel extensions #24 #25.
- The January series restored two-stage aggregation and extra grouping columns needed by joins, split out preparatory refactors, and introduced RelOptInfoSet to carry ordinary and grouped relations together, while the equality-safety question remained unresolved #26.
- Tom committed only the hash-table size-estimation refactor from the rebased series #28 as 0c7d537930, additionally widening its result and caller variables to double to avoid overflow; his announcement continued to reject RelOptInfoSet and invasive changes to low-level path constructors #29.
- Antonin responded by introducing RelInfoList, aggregating only paths retained for ordinary relations, and leaving scan and join path constructors largely untouched; he retained a combined join-search approach and again requested guidance on equality safety #30.
- After a July rebase, Richard Guo reported an execution crash and questioned the missing aggmultifn and explicit-sort alternatives; Antonin fixed parameter handling but deferred broader functionality until the design questions were resolved #32 #33 #34.
- Richard then supplied a one-line fix for a second crash caused by storing the wrong object in the aggregate-information lookup, which Antonin incorporated into the next full series #35 #36.
- Following another quiet period, Tomas Vondra benchmarked star-schema queries and reported roughly twofold improvements in many nonparallel cases, but no improvement for parallel plans; his review prompted better descriptions and merging the small join-helper preparation into the main patch #39 #40.
- Pascal, posting as legrand legrand, supplied the missing EXPLAIN SETTINGS flag, while Richard revisited the cost of repeated join-validity checks; Antonin accepted the flag and explained why earlier reviews had ruled out storing grouped paths alongside ordinary paths #41 #42 #43 #44.
- Pascal subsequently pointed to equalimage support as a possible solution to the equality-safety problem, and Antonin agreed to adapt the patch #45 #46.
- Andy Fan supplied a target-initialization cleanup and clarified that grouped relations should use root->upper_rels; Antonin accepted the storage correction and selected cleanup ideas, while questioning parts of the proposed function rewrite #47 #48 #49 #50.
- The May revision moved grouped relations into upper_rels, added equalimage checks and the EXPLAIN flag, rewrote target initialization, and added a separate parallel partial-path patch; Antonin defended support for generic join conditions and declined another broad decomposition or renewed aggmultifn work #52.
- Laurenz Albe rebased the three-part series in July and reported that make installcheck passed, preserving Antonin's implementation #54.
- When another rebase was requested in March 2021, Antonin withdrew the feature because years of limited progress and lack of available time no longer justified continued work, while explicitly allowing others to continue it #55 #56.
- Yuuki Fujii revived the discussion in March 2022 with a postgres_fdw extension atop the last series, reporting a 93% response-time reduction in his experiment and seeking interested reviewers or committers; the thread ends with that prototype unanswered and the main aggregation push-down feature still uncommitted #58.