model-writtenrun 7136 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jul 2023 · 3 entries
- Peter Geoghegan introduced a prototype in #1 that advanced ScalarArrayOp array keys while scanning leaf pages, reduced repeated index descents, and enabled more ordered multicolumn scans, with broader MDAM and skip-scan techniques presented as future goals.
- Matthias van de Meent questioned memory growth and the relationship to loose scans in #2; Peter explained incremental predicate generation in #3, while Matthias's separate rescan-page-cache prototype in #7 remained outside the main SAOP series.
- Alena Rybakina asked about planner transformations and selectivity in #10, and Peter clarified in #12 that the prototype primarily checked executable combinations rather than introducing a general CNF-to-DNF transformation.
Sep 2023 - Apr 2024 · 22 entries
- The redesign in #13 used tuple-driven binary searches and non-required-array handling to preserve index order even with leading inequalities, allowing the planner to remove special restrictions and avoid expensive filter quals.
- After upstream scan-checking changes required temporary disabling of optimizations in #15, Peter restored them for non-array scans and removed unsafe preprocessing under buffer locks in #16.
- Matthias's request for a clearer state-machine description in #17 preceded stronger advancement invariants and whole-array intersection preprocessing in #20; Matthias then stress-tested expensive collations and reviewed memory use, merging, and index-AM compatibility in #22 and #23.
- Peter made required-inequality handling explicit and fixed unintended full scans in #24, while initially retaining optimistic heuristics for continuing onto the next leaf page.
- Heikki Linnakangas reviewed the design in #25, requesting clearer state transitions, preservation of scan-checking optimizations, attention to nested-loop preprocessing costs, and a separate preprocessing source file.
- Tomas Vondra's benchmarks in #26 exposed repeatable regressions; Peter traced them to excessive page visits on low-cardinality indexes in #29 and replaced the speculative policy in #32, also fixing direction changes and mark/restore behavior.
- Following the holiday-period rebase in #33, Matthias identified cross-type comparison corruption and an assertion failure in #34; #36 addressed the assertion, and #42 separated sorting comparators from search comparators and corrected their mapping.
- Matthias argued for separating planner changes and documenting index-AM compatibility in #37 and #39; Peter retained a single integrated feature and added a compatibility warning, while rejecting the more elaborate array-merging proposal as excessive in #40.
- The implementation in #43 integrated page prechecking through scanBehind and changed preprocessing to operate on whole arrays once per rescan; #45 then consolidated preprocessing ownership and removed persistent arrayKeyData.
- Benoit Tigeot reported strong results on representative workloads using an earlier version in #48, and Peter acknowledged in #55 that Benoit's example had helped shape non-required-array handling.
- Matthias supplied the full series plus review fixes and a simpler sort-merge implementation in #51; Peter incorporated the merge algorithm in #52 and expanded normalization to combine arrays, inequalities, and scalar equalities, including reducing singleton arrays to scalar keys.
- Matthias proposed a per-attribute preprocessing fast path in #54, but Peter questioned its benefit in #57, and it was not included in the landed feature; planner-time preprocessing and more complete preprocessing unification remained future work, as discussed in #56.
- Performance testing found that linear scanning between moderately spaced matches could erase the gains from fewer descents, so #57 introduced within-page lookahead and cheaper array advancement.
- Peter replaced parallel primitive-scan counters with page-progress-based coordination in #58, then fixed a worker-sleep hang in #59 by publishing scheduled array positions so another worker could perform the descent, adding extensive regression coverage.
- The final posted version in #60 abandoned aggressive costing reductions, retaining conservative estimates with caps for extreme cases and excluding non-required arrays from primitive-scan counts.
- The feature landed as 5bf748b86b from #60, with additional parallel-scheduling, preprocessing, and lookahead edits; the commit credits Peter and Matthias as authors, while the three credited reviewers' visible reviews preceded substantial later changes.
- Alexander Lakhin reported an assertion failure with two array inequalities in #61, leading to 473411fc51, which skips final array preprocessing when no equality arrays remain.
- Tom Lane's Coverity report and follow-up review in #63 and #67 led to 3b08133cd1, removing four redundant preprocessing assertions rather than retaining a confusing false-positive warning.
- Donghang Lin supplied a DESC-index reproducer and guard patch in #70; Peter generalized it into an early return for eliminated array keys in f22e17f76c, explaining the change in #71.
- Alexander's cursor report in #72 showed that repeated preprocessing can occur without array keys, and 480bc6e3ed removed the invalid assertion while documenting the general once-per-rescan contract.
- The main SAOP feature and reported correctness fixes had landed by the end of this cycle, while general skip scan, planner-time preprocessing, and the KNN integration remained outside the completed work described in #56 and #76.
- After the supplied discussion ended, Peter implemented Heikki's file-extraction suggestion from #25 in #579788 in thread #50878, which supplied the matching patch for 597b1ffbf1; that later thread establishes the commit's provenance, superseding its previous attribution to this discussion.
Jul - Aug 2024 · 2 entries
- Anton A. Melnikov reported that the new execution model broke assumptions in the separate KNN-btree proposal in #75; Peter outlined possible integration approaches in #76, but the thread records no completed KNN adaptation.
- At the thread's last exchange, Alexander demonstrated lookahead-distance overflow in #77, and Peter supplied the bounds check inline in #78; it subsequently landed on the development branch as 09a8407dbf and on the stable branch as 6749d4aabe, representing one change.