model-writtenrun 1176 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2025 - Apr 2026 · 21 entries
- David Rowley opened the thread with precalculated attribute offsets and a dedicated cached-offset deformation loop, alongside two experiments for processing NULL runs and removing a separate no-NULL loop #1.
- After fixing LLVM integration and collecting more benchmark results, David dropped the two NULL-loop experiments because their gains were unconvincing, retaining the cached-offset approach and temporarily keeping the optional by-value loop #2 #3.
- Chao Li's review led to explicit uninitialized-offset sentinels and assertions, while further discussion examined bitmap bounds and zero-attribute requests; Chao also reported substantial improvements on an Apple M4 #4 #5 #6 #7 #11.
- Andres Freund requested a separate finalization prerequisite and stronger assertion checks, so David split out the TupleDescFinalize() call sites and removed the optional by-value loop after its aggregate benchmark results disappointed #8 #9.
- Andres requested incremental-deformation measurements and a C benchmark helper to isolate executor overhead, leading David to add the initially test-only deform_bench module and revise first-NULL detection #10 #12 #13.
- Andres identified dependency chains, store ordering, tuple-header accesses, and repeated alignment work as bottlenecks; David experimented with combined alignment/fetch operations and pre-expanding the NULL bitmap through a lookup table or AVX512 #14 #15 #16.
- Andres supplied a portable multiplication-and-mask technique for expanding bitmap bits, which David adopted with rounded isnull storage and faster attribute fetching; John Naylor's bit-scan review also prompted corrections and eventual reuse of the existing bit utility #17 #18 #20 #21.
- After discussion of compiler vectorization and guaranteed NOT NULL attributes, David consolidated the experimental optimizations, added an opt-in guaranteed-attribute fast path, and introduced separate sibling-call and eight-byte CompactAttribute patches #22 #24 #25.
- Amit Langote found duplicated offset code, Zsolt Parragi identified incorrect bitmap expansion on big-endian machines, and John verified that the revised series fixed the big-endian regression tests #26 #29 #30 #32.
- Álvaro Herrera explored further structure packing, but David explained that eight-byte CompactAttribute elements permit simpler address calculations than six-byte elements, and Álvaro accepted that rationale #33 #37 #38.
- The benchmark module's permanent home remained unsettled: David and Andres favored retaining useful microbenchmarks, while Álvaro advocated a dedicated benchmarking area, and the participants agreed that such tooling should not be installed by default #31 #38 #39 #40 #41 #42.
- Zsolt's review moved bounds checking ahead of array accesses and corrected alignment handling, while Andres's generated-code analysis led to size_t loop indexes and better tail-call placement in the reordered series #34 #35 #36 #43 #44.
- David added a WIP selective-deformation path that fetches only requested columns and preserves required-column information before physical target-list replacement, explicitly deferring it beyond PostgreSQL 19 because it arrived late and still lacked JIT support #45.
- Junwang Zhao proposed simplifying cached-prefix bounds, which David accepted, but David declined caching the first variable-width attribute because the limited gain would complicate alignment and length handling; the final series also restored do/while loops for older compilers and expanded selective-deformation benchmarking #46 #47.
- The sibling-call component of the final series landed unchanged as 4deecb52af, leaving the other components for separate commits #47.
- The unchanged finalization prerequisite landed as 503620311e, followed by the main optimization as c456e39113 with corrected slot-flag initialization, array rounding, and comments, excluding the benchmark-module adjustment from the submitted component #47.
- Tender Wang reported and bisected a post-commit crash, David diagnosed starting at the first NULL's cached offset as invalid, and Junwang supplied a smaller reproducer and patch; David's committed variant additionally guarded the zero-position case in 7a2ab122a1 and described temporary cross-check testing #49 #50 #51 #52.
- The eight-byte CompactAttribute component then landed as d8a859d22b, retaining the final series' structure and adding an explicit cast for the checked cached offset #47.
- Tender's subsequent SQLSmith report showed that minimal tuples can contain cstrings, so David introduced a constant parameter selecting cstring-capable deformation and committed the unattached fix as 07d5bffe75 #53 #54 #55.
- Alexander Lakhin later reported a JSON_ARRAY assertion, Junwang traced it to UNKNOWNOID row attributes, and jian he supplied a row_to_json reproducer; David removed the remaining invalid cstring assumptions from nocachegetattr() in 331d829e62 #56 #58 #59 #60.
- At the final message, the four production optimization components and all three reported fixes had landed, while selective deformation remained future work, benchmark-tool integration remained unresolved, and David's question about permanent fastgetattr() test coverage had no recorded resolution #45 #42 #52 #60.