model-writtenrun 6892 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - Apr 2026 · 29 entries
- Ashutosh Bapat opened the thread by combining Heikki Linnakangas's shared-memory registration prototype with ordinary pointer access and a resizing prototype using separate mappings, aiming to support shared-buffer resizing while calculating allocation sizes only once #1.
- Heikki explained how address reservation and madvise could support growth and shrinkage, and Ashutosh replaced separate mappings with a single file-backed region and hole punching #2 #3.
- Heikki's experiment and Andres Freund's review showed that anonymous mappings already supported MADV_REMOVE, while Andres warned that growth needed MADV_POPULATE_WRITE to avoid huge-page allocation failures becoming SIGBUS; Ashutosh removed memfd_create and then added explicit runtime population and TAP tests #4 #5 #6 #7.
- Ashutosh subsequently removed unnecessary whole-structure page alignment and left synchronization and optional memory protection to callers, while identifying unresolved accounting, memory-size GUC, portability, and test-measurement questions #9.
- Heikki focused March's work on making registration independently committable, documenting it and converting pg_stat_statements, while Robert Haas pressed for a simpler lifecycle that worked naturally under EXEC_BACKEND and avoided proliferating initialization mechanisms #10 #11 #15.
- The next revisions embedded pg_stat_statements' LWLock and HASHCTL options; Zsolt Parragi then found missing DSM sizing, incorrect hash flags, duplicated size accounting, and a broken documentation example, which Heikki fixed along with crash-restart registration retention #16 #17 #18 #21.
- Robert challenged callbacks tied to individual structures and descriptor-heavy initialization, prompting Heikki to move pg_stat_statements startup work into its initialization callback and then separate subsystem-level request, init, and attach callbacks from individual allocation requests #23 #24 #25 #28.
- That redesign expanded the series to a built-in subsystem registry, after-startup tests, SLRUs, AIO, alignment, and broad core conversions, while retaining the legacy APIs for extensions #28.
- Ashutosh supplied clearer ShmemIndex initialization ordering and naming, and Heikki landed that prerequisite with those edits as 6b8238cb6a from #28, confirming the integration in #32 after the review in #29.
- Robert and Daniel Gustafsson favored copying request options so later caller mutation could not silently change allocations; Heikki consequently separated copied options from persistent handles and explained why grouped callbacks were needed for atomic after-startup initialization #31 #33 #34.
- The independent predicate-lock size-variable cleanup landed unchanged from #34 as 3fd0577728, following Ashutosh's review of its earlier form in #29.
- Ashutosh's detailed reviews drove clearer documentation, after-startup registry cleanup, and better EXEC_BACKEND tests; Heikki then introduced variadic request macros to avoid pgindent problems with compound-literal options #35 #37 #41 #42.
- The pg_stat_statements crash-restart test landed unchanged from #42 as 148fe2b05d, including the actual post-restart queries and allocation checks Ashutosh had requested in #29.
- After rebasing the remaining work onto shared-hash changes, Matthias van de Meent identified request-list type confusion and questioned unnecessary descriptors; Heikki removed ShmemStructDesc from the public API and split allocation from attachment handling #47 #49 #51.
- Ashutosh concurrently restored resizing on top of the revised registration series, and Matthias pushed for consistent fixed/resizable size semantics and an ABI that did not vary with HAVE_RESIZABLE_SHMEM; the first revision also addressed Windows preprocessing and build problems #54 #55 #57 #67.
- Matthias found that named LWLock tranche requests could arrive after the main array was sized, prompting Heikki's initialization-order correction #52 #60; the resulting test_lwlock_tranches improvements were posted separately in thread #139221 as #1000139 and landed unchanged as 92a685e407, so that commit belongs to the separate thread.
- Matthias supplied two incremental SLRU constification patches, but neither appears in the final registration series or its SLRU commit; broader zero-initialization cleanup and new shmem-exit callbacks were also deferred to avoid expanding this work #69 #70 #62 #68.
- Heikki posted the final registration series with one opaque callback argument and then announced its landing after another cleanup pass #70 #71.
- The preparatory code movement and registration mechanism landed from #70 as 6ef9bee293 and 283e823f9d, with light comment, example, typedef, and callback-argument corrections; the latter also credits Ashutosh as co-author.
- The after-startup test module, pg_stat_statements conversion, and built-in registry landed unchanged from #70 as 6409994c7d, d4885af3d6, and 1fc2e9fbc0.
- The LWLock conversion, initial core-subsystem conversions, and combined predicate initialization refactoring landed unchanged from #70 as a006bc7b16, c6d55714ba, and 4c9eca5afe.
- The SLRU conversion landed from #70 with light cleanup as 2e0943a859, while the AIO conversion became 58a1573385 after the committer replaced its combined worker allocation with separate queue and control allocations.
- Alignment support landed from #70 as dacfe81a0d with padding moved before the size addition; the buffer-manager and remaining-subsystem conversions landed unchanged as a4b6139dcc and 9b5acad3f4.
- With registration committed, Ashutosh resent the resizing remainder, replacing process-wide RSS measurement with smaps accounting and adding ABI-stable declarations, minimum sizes, and optional protection; he then consolidated the patches and removed temporary diagnostics after successful CI #72 #73.
- Dagfinn Ilmari Mannsåker spotted a redundant injection-point preprocessor guard in the landed conversion, and Heikki removed it and adjusted include placement in 9480c585df #74 #75.
- While merging resizing tests into test_shmem, Ashutosh encountered a deadlock when protection code looked up ShmemIndex from an initialization callback and proposed releasing ShmemIndexLock before callbacks #76 #77.
- Matthias supplied incremental min/max and validation changes, but Ashutosh questioned the special zero-size sentinel and mutation of caller options, accepting only the prospect of selected error-handling simplifications rather than the proposal wholesale #78 #81.
- Heikki and Andres asked whether the API should permit holes inside allocations and how far it could be portable; Ashutosh retained end-only resizing for the buffer-manager use case and to avoid promising capabilities unavailable on other platforms #79 #80 #82.
- Heikki explained that releasing ShmemIndexLock before initialization completed would let another backend attach too early, so the proposed lock-release change was replaced by an explicit locking contract and clearer diagnostics #83 #84 #85.
Jun - Aug 2026 · 7 entries
- Haoyu Huang contributed Databricks' related online buffer-pool resizing implementation with low/high watermarks and AccessNBuffersLock as input to the existing effort, explicitly declining to propose a competing direction #86.
- Ashutosh accepted the clarified locking contract, and the documentation patch from #85 landed unchanged as 6f7199a124 after his review in #87.
- In July, Ashutosh returned with consolidated resizing work that used MAP_NORESERVE, applied protection outside init/attach callbacks, and exposed minimum, initial, and maximum memory requirements; startup protection synchronization and portability boundaries remained open design questions #88.
- Palak Chaturvedi diagnosed test failures caused by smaps traversal crossing into neighboring mappings, mismatched sscanf counter widths, optimized-away guard-page reads, and Windows test execution, supplying a portability fix alongside the unchanged resizing patch #89.
- Palak removed a diagnostic patch that conflicted internally with the proposed test fix, explaining that the apparent rebase failure was within the submitted series rather than caused by master #90.
- Ashutosh requested stronger VMA identity checks, debug logging, and capability-based test gating; Palak's final submission added inode/path checks, DEBUG1 output, and a runtime capability probe while retaining volatile reads, reporting 106 passing local subtests #91 #92 #93.
- At the final message, the registration API, core conversions, supporting tests, and documentation clarification had landed, while resizable shared-memory structures and their portability fixes remained proposed, with startup-protection coordination and broader platform support unresolved #88 #93.