model-writtenrun 2375 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ashutosh Bapat opened the thread with a proposal to avoid repeatedly translating the same RestrictInfo for partitionwise joins, attaching per-clause translation caches and an EXPLAIN memory-measurement helper in #1.
- Richard Guo reported a planning crash in #2, and Ashutosh fixed an erroneous bitmap free in #3, while noting that an index-column mismatch still needed investigation.
- David Rowley explained that measuring net allocated chunks could miss substantial retained planner memory in #4, prompting Ashutosh to move the EXPLAIN instrumentation discussion to a separate thread in #5.
- Ashutosh explored constructing child join restrictions from joining relations in #6, but concluded that conflicting intermediate translations across join orders made explicit translation tracking simpler.
- The next design in #7 moved tracking outside adjust_appendrel_attrs() into nested PlannerInfo hash tables and added separate patches for freeing intermediate relids and reusing commuted RestrictInfos.
- After maintenance updates, #13 removed the separately developed EXPLAIN helper; Tomas Vondra then confirmed memory savings but questioned the complexity, absence of planning-time gains, and possible costs for ordinary queries in #14.
- Suggestions recorded in #17 and later attributed to Tom Lane led to the flat hash table in #18, which also removed commuted-clause tracking because upstream changes had reduced repeated path reparameterization.
- Alvaro Herrera's off-list review exposed an opportunity to accelerate create_join_clause(), so #20 extended the shared cache to EC-derived child clauses and separated interface, structure-layout, translation-reuse, and simplehash experiments.
- Dmitry Dolgov initially struggled to reproduce the performance gains in #21, prompting Ashutosh to provide benchmark scripts in #22; Alvaro's subsequent measurements in #23 supported emphasizing planning speed over memory savings.
- Ashutosh proposed a simpler per-EquivalenceClass hash table in #26, rebased the existing series while dropping its unhelpful simplehash experiment in #27, and posted the alternative implementation with a separate constant-RHS assertion in #29.
- Dmitry traced his earlier benchmark discrepancy to missing primary keys in #28, while Amit Langote independently measured substantial gains for large joins in #32 and #34; Ashutosh quantified the new design's modest memory overhead in #33.
- Amit took over preparing the series for commit in #36, adding naming, organization, assertion, and documentation improvements; Ashutosh supplied a small follow-up delta in #37, which Amit incorporated in #38.
- Amit noticed that the new cleanup helper lost an existing list_free() in #38; Ashutosh supplied a fix in #39, and Amit corrected its ordering and folded it into #40, after which Ashutosh reported successful forced-hash regression testing in #41.
- Additional measurements in #42 reduced concern about noisy small-query regressions, but David Rowley's review in #44 challenged the fixed 256-bucket allocation and motivated the list-length-based sizing patch in #46.
- Alvaro questioned apparently negligible benchmark gains in #47, and Ashutosh explained in #48 that the benchmark lacked indexes needed to exercise the optimized create_join_clause() path.
- David found that nonconstant clauses occupied two hash entries and proposed ordering their EquivalenceMember pointers in #49; Ashutosh implemented canonical keys in #50, and Amit centralized key construction in #51.
- Ashutosh demonstrated a constant-clause case where the list already contained 100 entries before the first lookup in #52, supporting dynamic sizing; after discussion with David, Amit used the actual list length, retained the threshold macro, and folded assertion and comment improvements into #53.
- Ashutosh supplied final editorial changes in #54, and Amit incorporated them into the final two-patch submission #55.
- Amit committed the assertion as 887160d1be and the EC lookup optimization as 88f55bc976, each with a diff exactly matching its corresponding patch in #55, and announced completion in #56.
- The original translation-memory optimization remained uncommitted: Ashutosh planned a new CommitFest entry in #57, and Amit closed the thread in #58 encouraging further memory savings while keeping the approach simple.