model-writtenrun 3476 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2023 - Apr 2024 ยท 20 entries
- Masahiko Sawada opened the thread with severe logical-decoding delays for transactions containing many subtransactions and proposed large-transaction and in-memory lists, reducing his example from over two minutes to roughly three seconds #1.
- Dilip Kumar questioned whether approximate size groups would cause too many disk spills #2, Amit Kapila raised maintenance overhead #16, and Alvaro Herrera suggested building a binary heap when eviction became necessary #7.
- Sawada abandoned approximate groups because serializing many small transactions could outweigh faster selection, and submitted an indexed binary heap with growable storage, efficient arbitrary removal and updates, and a separate memory-accounting batching patch #18.
- After measuring a normal-case regression, Sawada introduced transaction-count-dependent heap maintenance and dropped the standalone batching patch #19; Hayato Kuroda reviewed the API #20, Vignesh C proposed hysteresis #21, and Shubham Khanna confirmed substantial subtransaction-case gains #22.
- Further measurements showed unacceptable overhead without spilling, so Sawada stopped maintaining the heap before eviction required it and reintroduced transaction-level accounting optimizations #30, while Ajin Cherian reported favorable follow-up tests #32.
- Tomas Vondra supplied an annotated series, benchmark results, and suggestions for clearer helpers, direct use of txn->size, and different enable/disable thresholds #34; Sawada incorporated those changes in the next submission #35.
- Discussion with Vondra led to using MaxConnections instead of an arbitrary fixed threshold #37 #38, while GenerationContext memory retention and reporting a memory high-water mark were left for separate work #35.
- Peter Smith found missing node-array deallocation and reviewed the hash-index implementation #42 #44, while Vignesh reported additional regressions #43; Sawada fixed cleanup and retained linear searches below the transaction threshold #46.
- Smith then proposed eliminating the explicit tracking-state enum and sharing the update helpers #49 #53, producing a simpler implementation that inferred readiness from heap emptiness #54.
- Sawada rebased the series in late March #56, Shubham confirmed the earlier regression was resolved #57, and final reviews from Vignesh, Amit, and Hayato led to comment and assertion refinements before the final submission #58 #60 #61 #64.
- The three components of #64 landed on April 3: growable storage unchanged as bcb14f4abc, indexed operations with a comment typo corrected as b840508644, and eviction improvements with an additional assertion as 5bec1d6bc5.
- After the initial landing, Jeff Davis questioned repeated hash lookups and the use of pointer values as hash keys, arguing that the extra table duplicated existing transaction lookup machinery #65 #70.
- Sawada built a separate benchmark extension that demonstrated substantial indexed-heap overhead and compared a callback-based alternative with the old implementation #72.
- Sawada supplied alternative index-update and hash-function callbacks #74, while Jeff supplied a separate patch hiding simplehash declarations inside binaryheap.c #76; these experiments did not become the final solution.
- Heikki Linnakangas proposed using the existing pairing heap instead #77, and Jeff agreed it could avoid both the extra hash table and new binaryheap APIs #78.
- Michael Paquier raised the risk of redesign after feature freeze and suggested reverting #79, but Heikki favored a localized pairingheap replacement followed by reverting the now-unneeded binaryheap changes #82.
- Heikki submitted the pairingheap rewrite with preliminary performance results and removed threshold-based maintenance entirely #85; Michael reviewed the cleanup #86, and Heikki identified an unused include that could also be removed #87.
- Hayato reviewed allocation context and transaction-node lifetime #89, while Sawada repeated the benchmarks and accepted small measured regressions in exchange for simpler code #90.
- Heikki's patch landed with comment and include cleanup as efb8acc0d0, followed by the discussion-driven revert of the indexed and growable binaryheap prerequisites as 810f64a015; Sawada announced both actions in #91.
- The thread ended with pairingheap-based eviction committed and the binaryheap experiments superseded; Sawada explained that he had omitted Hayato's allocation-context and zero-size-node suggestions to keep the correction focused, leaving any justified follow-up fixes separate #93.