model-writtenrun 9563 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun 2018 - Apr 2019 ยท 29 entries
- Peter Geoghegan began with an unfinished prototype that made B-tree keys unique by appending heap TIDs to comparisons and suffix-truncating pivot tuples, aiming to enable future retail index deletion while using amcheck to verify stricter invariants #1.
- Robert Haas emphasized the value of retail deletion for both zheap and ordinary heaps, while Claudio Freire and Amit Kapila discussed cleanup and delete-marking requirements; this thread ultimately pursued the B-tree prerequisite rather than implementing deletion itself #2 #4 #7 #9.
- Peter reversed TID ordering to descending to reduce duplicate-insertion regressions and dependency-test churn, then restored insertion hints and improved truncated-key searches, making the work a candidate for a useful standalone feature #11 #12.
- Andrey Lepikhov's testing exposed unstable cascading-DROP output, and Peter explained that dependency reporting relied on incidental index order rather than identifying an index-corruption failure #13 #14.
- After the summer gap, Peter added split-point selection that balanced free space against suffix truncation, then replaced raw tuple-byte probing with attribute-aware comparisons and three explicit strategies for ordinary pages, many duplicates, and single-value pages #15 #16.
- Andrey's interface review and Peter Eisentraut's requests for clearer abstractions and a smaller series led to BTScanInsert, cached binary-search bounds, and separate keyspace and split-selection patches #17 #20 #24.
- Peter also introduced splitting after a newly inserted tuple when insertions increase within local key groups, reporting major reductions in TPC-C index sizes and keeping this optimization as a separate component #19 #24.
- Although indexes became smaller, throughput results remained mixed; Andres Freund suggested investigating buffer eviction under locks, and Peter's instrumentation ruled out an increase in that particular behavior #25 #26 #29.
- Heikki Linnakangas argued for ascending TID order to support future compression and reduce split WAL, and Peter found that the change removed the observed TPC-C regression #33 #35.
- The next series adopted ascending order, preserved access to older index formats without requiring immediate REINDEX, and added high-key checks that could end forward scans before visiting a right sibling #39.
- Peter temporarily added a pg_depend tiebreaker column to preserve useful dependency diagnostics, then fixed its Windows portability issue; dynamic prefix truncation was explicitly left to separate development #40 #42 #43.
- Heikki's detailed review requested a standalone scankey refactoring, clearer locking and format explanations, and simpler split-selection control flow; Alexander Korotkov separately questioned compatibility handling and the space reserved for pivot TIDs #45 #49.
- Peter extracted nbtsplitloc.c and the scankey patch, generalized truncated-pivot comparisons, and then reused prepared scankeys to avoid new metadata lookups under buffer locks; Tom Lane's independent dependency fixes allowed the proposed pg_depend column to be dropped #51 #52.
- Heikki supplied an alternative split-selection implementation, but Peter's land-registry tests showed that prioritizing maximum truncation could badly unbalance pages; they agreed to preserve the existing priorities while separating legal-split enumeration from choosing a split #53 #54 #55.
- Peter restored regression coverage that suffix truncation had accidentally weakened, reduced the single-value fillfactor for concurrent insertions, removed the remaining dependency workaround, and added optional amcheck searches that re-find every leaf tuple from the root #56.
- The resulting top-down split-selection rewrite materialized all legal candidates before choosing among them, retained the duplicate-handling strategies, and simplified the split-after-new-item optimization #58.
- Heikki reviewed that rewrite and found a WAL metapage-version error in the core patch; Peter corrected it, refined split intervals and boundary analysis, and incorporated tuple-format diagrams and clearer documentation #59 #60 #61.
- Heikki first supplied a comment-review delta and then a replacement scankey patch that separated mutable insertion state from search keys; Peter initially deferred the replacement while they clarified truncated-pivot searches #63 #67 #77.
- Compatibility testing prompted a dedicated patch for artificially forcing version-3 indexes, while discussion of negative-infinity semantics eventually produced the clearer pivotsearch flag and additional split-interval correctness checks #72 #73 #78 #82 #86.
- Large I/O-bound benchmarks favored the patch, but very small, highly contended workloads exposed modest regressions; Peter attributed some of these to packing more traffic onto fewer pages, and Robert accepted that tradeoff while later expressing concern about single-client overhead #87 #92 #117 #118.
- Heikki reorganized the continuescan patch so dead-tuple and page-boundary handling lived in _bt_readpage(), and Peter incorporated both that replacement and Heikki's BTInsertStateData design into the full series #101 #103.
- Review of amcheck clarified that the new option re-finds rather than moves tuples, renamed it rootdescend, and established that exhaustive searches improve corruption detection without replacing every possible high-key consistency check #104 #106 #110 #114.
- Heikki's final replacement separated legacy and heapkeyspace insertion loops, but Peter found an incorrect high-key comparison that caused regression failures; after initially objecting, they reached agreement to retain the refactoring with corrections #115 #116 #121.
- Peter committed the insertion-scankey and heap-TID components from Heikki's final replacement, with localized correctness fixes and editorial changes, as e5adcb789d and dd299df818 #115 #122.
- The secondary split-selection component from #114 landed with comment-only cleanup as fab2502433, completing the main split-strategy work.
- The rootdescend amcheck component from #114 landed unchanged as c1afd175b5, and Peter announced that the first four patches were committed #122.
- The high-key continuescan component from #114, incorporating Heikki's restructuring, subsequently landed with light cleanup as 29b64d1de7.
- Peter reported that the remaining split-after-new-tuple optimization also reduced major system-catalog indexes, and its final version from #114 landed with light cleanup as f21668f328 #123.
- At the thread's close, Peter confirmed that all six production components had landed and supplied an experimental patch removing split-after-new-item safeguards to explore adverse workloads; its benchmark regressions informed the residual heuristic risk rather than proposing another production change, and the separate pageinspect debugging component remained review instrumentation #124 #114.