model-writtenrun 5084 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jul - Aug 2022 · 14 entries
- David Rowley opened the thread with #1, adapting Andres Freund's prototype to reduce allocation headers to eight bytes and address Generation-context sort regressions caused by larger per-tuple overhead.
- Yura Sokolov questioned the extra fields for oversized chunks in #2, while Andres proposed encoding free-list links in the header in #3; David explained in #6 that links can cross blocks, preventing that simple encoding.
- David's redesign in #9 made MemoryChunk fixed-size, using an external flag and allocator knowledge to derive dedicated-block sizes and addresses without extra chunk-header fields.
- Robert Haas requested clearer huge-allocation limits in #10, and Tom Lane accepted retaining three method-ID bits after the discussion in #12, #14 and #17 established that the encoding could be expanded later.
- Andres's detailed review in #11 and Alvaro Herrera's support in #13 led to named bit-width definitions, clearer limits and designated method initializers in #19.
- Performance work in #20 stored free-list indexes instead of sizes and moved free-list links to chunk ends, but the broader measurements in #21 favored moving links back to chunk starts and also exposed the need to distinguish freed chunks from live zero-byte allocations.
- After integer-width and C++ fixes in #23 and #24, David landed c6e0fe1f2a with the free-list placement and checking changes described in #25.
- Amit Kapila reported 32-bit buildfarm alignment failures in #26, prompting David's padding hypothesis in #28 and the unattached fix df0f4feef8.
- Tomas Vondra demonstrated that the padding did not fix the layout in #31, and Tomas and Tom Lane traced the actual fault to unaligned SlabBlock-size calculations in #36 and #38.
- Tomas supplied #39, David added Slab_BLOCKHDRSZ and a sentinel-address correction in #49, and Tom's ARM/PPC testing in #51 supported landing d5ee4db0ea with Tomas's equivalent sentinel expression from #53.
- Once the actual slab repair was verified, David followed the agreement in #60 and removed the ineffective MemoryChunk padding with 5495796ad1.
- Robert Haas supplied assertion casts for older clang in #68; David added enum documentation in #71 and Tom's macro correction from #73, landing the combined cleanup as 05f9084236.
- The slab investigation also showed that current core users never exercised the sentinel check, prompting the guaranteed-sentinel proposal in #52 and allocation-cost experiments in Tomas's #75 and David's independent logging patch #76.
- The latent slab sentinel bug and preventive alignment changes were also applied to the older allocator layout as c4e861b7bb, adapting #49 rather than introducing a separate design.
Sep - Oct 2022 · 16 entries
- Tomas refined his measurements in #77, while Tom argued in #78 that doubling small power-of-two allocations was too costly and agreed in #80 with reserving extra AllocSet space only for dedicated chunks.
- David replaced the sentinel experiments with #88, guaranteeing sentinel space for Slab, Generation and external AllocSet allocations while leaving small AllocSet classes unchanged; this landed unchanged as 0e480385ec.
- Andres discovered in #90 that the header conversion had left MemoryContextContains using the obsolete representation, and Tom explained in #92 that existing tests concealed the problem by merely performing unnecessary copies.
- David's repair progressed from #93 to #96 after Tom clarified the prechecks in #95, and the latter landed unchanged as 5265e91fd1.
- Julien Rouhaud then reported a 32-bit failure in #101, and David traced it in #103 to an aggregate returning an interior pointer that the repaired membership function incorrectly treated as a chunk boundary.
- Tom proposed validating membership through known context blocks in #104, which David implemented experimentally in #106, while b76fb6c2a9 temporarily made MemoryContextContains return false to restore working builds at the cost of extra copies.
- Andres argued in #107 and #109 that correctness should not depend on interpreting arbitrary memory as a chunk header, leading David's #112 to explore debug-only membership checks, magic fields and stricter aggregate/window result-allocation conventions.
- Tom resisted unnecessary copying in #114, and David's revised #119 explored result-lifetime assertions across tuple, query, message and cached-plan contexts, exposing the complexity of retaining general membership checks.
- Ranier Vilela contributed an unrelated older allocator experiment in #122, clarified in #124 that it was only an idea, and withdrew it in #125.
- Tom replaced the membership designs with #126, recognizing that aggregate transition values already live long enough and that window results mainly need copying when multiple functions share the same window object.
- After David's examination in #127, 42b746d4c9 landed the executor and regression-test portion of #126 with a comment addition, and 9543eff5e0 landed its API-removal portion unchanged.
- The compatibility discussion in #128 favored making extension authors reconsider their pointer assumptions instead of retaining a misleading MemoryContextContains compatibility wrapper, leaving the block-search and debug-only alternatives uncommitted.
- Tom began a separate hardening round in #130, and Andres's review in #131, David's testing in #139, and allocator-pattern investigation produced the reserved IDs and error handlers in #141, committed unchanged as 80ef926758.
- Tom's #144 addressed a further failure mode in which a bogus free-list index could make AllocSet wipe almost the whole address space, adding context-type and index checks before extending the approach to all allocators in #145.
- David's review in #146 persuaded Tom to preserve assertion-only checking in SlabFree while retaining runtime checking in SlabRealloc, producing 0e87dfe464 from #145 with that local behavior change.
- By the final exchange, the header reduction and subsequent repairs had landed, and discussion had moved to future Slab performance and radix-tree suitability; John Naylor accepted Andres's explanation of separate slabs by size class in #152.