model-writtenrun 6850 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Oct 2024 - Jul 2025 · 16 entries
- Dmitry Dolgov proposed changing shared_buffers without restarting by separating buffer-related shared-memory mappings and growing them with Linux mremap, while Thomas Munro pointed to earlier shrinking experiments with Palak Chaturvedi #1 #4.
- Peter Eisentraut reviewed the shared-memory APIs, proposed a configurable upper limit, supplied an independent PGShmemHeader pointer-type cleanup, and suggested removing the misleading PG_MMAP_FLAGS macro #7.
- Robert Haas called for segment terminology and phased coordination that would prevent a backend from seeing buffer identifiers outside its accessible mapping #10.
- Peter committed the InitShmemAccess portion of his cleanup as 2a7b2d9717, taking the two relevant file hunks unchanged from #7 and leaving the broader pointer-type conversion out #11.
- Robert Haas and Tom Lane rejected relying on apparently free address gaps, while Matthias van de Meent proposed PROT_NONE reservations and Andres Freund recommended MAP_NORESERVE; the discussion converged on stable addresses within reserved space #15 #24 #25 #28 #30.
- Ashutosh Bapat tested reservation and resizing behavior, then refreshed the original series in January with compilation fixes and TODOs while investigating cross-backend synchronization #31 #32.
- Dmitry introduced pending GUC assignments and postmaster-driven ProcSignal/global-barrier coordination, and Ashutosh added experimental shrinking, dirty-buffer eviction, and replacement-strategy resets #33 #35.
- Ni Ku found that huge-page mremap could neither grow mappings nor reclaim shrunk memory as required; Dmitry proposed retaining anonymous-file backing across unmap/remap and truncating it, which Ni Ku verified reclaimed huge pages #37 #38 #40 #41.
- After Ashutosh demonstrated that disjoint groups could pass a dynamic barrier separately, Dmitry added received-generation tracking, explicit address reservations controlled by max_available_memory, and huge-page remapping that made anonymous-file backing mandatory #42 #43.
- Further reservation and synchronization concerns led Thomas Munro to propose permanent per-segment mappings resized through their backing files, preserving pointers and avoiding repeated remapping; Dmitry agreed to investigate #53 #61 #62 #64.
- Thomas explored portable backing objects and huge-page reservation requirements, while Jack Ng tested the coordination, found overlapping or misaligned mappings under small reservations, and successfully exercised the permanent-mapping approach with huge pages #59 #63 #68 #70.
- Ashutosh extended shrinking support with eviction and replacement-strategy reinitialization, then corrected background-writer, clock-sweep, and stale buffer-ring handling; pinned buffers still caused fatal failure #73 #74.
- Dmitry adopted permanent file-backed reservations resized with ftruncate and mprotect, incorporated Ashutosh's shrinking work, and moved eviction before truncation to avoid SIGBUS, although global synchronization and worker handling still needed work #75.
- Ashutosh fixed an uninitialized shared-memory page counter, and Tomas Vondra's broader review then exposed resize crashes, portability problems, missing tests and documentation, and unclear state transitions #77 #78.
- Tomas advocated an explicit maximum buffer count and callable resize operation with failure handling; Dmitry considered a coordinator worker, while Ashutosh argued for preserving configuration-file reloads and applying their pending target through a separate function #80 #84 #85 #86 #87.
- Discussion of allocation visibility showed that freelist manipulation alone could not synchronize resizing, leading toward separate counts for buffers available for allocation and buffers still accessible to backends #82 #91 #99 #101 #111 #112.
Sep - Nov 2025 · 5 entries
- In September, Ashutosh found lookup-table allocation problems and an over-allocation bug that had masked invalid-memory accesses, chose a maximally allocated lookup table, and added diagnostic views and tests incorporating Palak's initial stress-test work #116.
- Andres rejected pending-GUC hooks and global rendezvous because a participant could wait while holding locks needed by another participant, and Dmitry agreed to pursue a phased protocol without that global wait #117 #118 #119.
- Checkpointer crashes drove Ashutosh's October redesign: configuration reload established a target, pg_resize_shared_buffers coordinated phased changes, max_shared_buffers defined the reserved maximum, and active/transit buffer ranges let ordinary work continue; the pending-GUC patch was reversed within the uncommitted series #127.
- Dmitry and Ashutosh discussed their overlapping redesign efforts, after which Ashutosh consolidated the series, moved resizing into buf_resize.c, and used shared active/current counts and permanent mappings to remove the postmaster from resize coordination #128 #129 #130 #131.
- Michael Paquier committed Ashutosh's PG_MMAP_FLAGS cleanup from #613404 in the separate thread #53152 as c100340729, with light commit-message and whitespace edits; Peter's suggestion originated here in #7, and Ashutosh subsequently confirmed the landing in #132.
Jan - Feb 2026 · 4 entries
- Ashutosh's January update improved EXEC_BACKEND support, documentation, and tests; Heikki Linnakangas then challenged the segment-oriented API, and Ashutosh reduced the layout to two segments while considering structure-oriented allocation #132 #135 #138.
- Heikki supplied a separate descriptor-based shared-memory registration prototype, and Ashutosh extended it with real pointer variables instead of macros to improve debugger visibility, a direction Heikki accepted #139 #147 #148.
- Jakub's testing exposed startup, NUMA, and huge-page problems; a rounding fix and the two-segment layout resolved some findings, while further investigation identified silent huge-page fallback and a leaked probe mapping #136 #142 #144 #149.
- Andres advocated MADV_REMOVE to avoid multiplying mappings and supported the registration API; shared-memory infrastructure work moved to a separate thread while buffer-resizing development was deferred #150 #151 #152 #153.
Jul - Oct 2026 · 9 entries
- After the gap, Ashutosh resumed buffer resizing on the new PostgreSQL 19 shared-memory infrastructure, adding resizable structures, stronger documentation and tests, and process-local buffer-count shadows synchronized through ProcSignalBarrier, with selected ideas from Haoyu's separate implementation #154.
- Expanded stress tests found checkpoint bookkeeping failures and unsafe interrupt placement in buffer scans, prompting fixes to those paths and pg_prewarm, while pg_buffercache_os_pages still crashed during concurrent resizing #155.
- Palak fixed pg_buffercache_os_pages by processing one buffer at a time through a materialized result, trading additional NUMA syscall overhead for safe resizing, and separately fixed a flaky test by creating its resizer backend after configuration reload #156 #157.
- Yuhang Qiu identified over-wide MADV_REMOVE ranges, skipped in-flight tagged buffers, stale pin limits, missing configure regeneration, misleading tests, and interface concerns; Palak supplied pin-limit and diagnostic fixes, which Yuhang approved before providing further reproductions #158 #159 #160.
- Palak corrected memory-reclamation bounds and tagged-buffer eviction, then addressed Yuhang's discovery that DROP TABLE could clear a tag between the initial check and header locking by replacing an assertion with a locked recheck #161 #162 #163.
- Yuhang next found parallel-worker initialization failures and unnecessary repopulation of existing pages during growth; Palak integrated the accumulated work into a complete nineteen-patch series with worker-GUC handling, narrower growth ranges, stale-hint validation, and rollback-metadata checks #164 #165.
- Yuhang found that the resize function lacked its documented superuser restriction and that the eviction test could miss its intended victim, while Ashutosh accepted the SIGHUP ordering fix and requested further justification for several other changes #166 #167.
- Palak's final twenty-three-patch series capped oversized requests at max_shared_buffers, enforced superuser-only resizing, strengthened the in-flight-read test, added concurrent-resize diagnostics and configuration coverage, and reported passing regression, recovery, and stress checks #168.
- At the last message, the main resizing feature remained under review, with open questions about naming, SHOW output, all-partition-lock scans, shared-memory reporting compatibility, NUMA overhead, stale-hint test coverage, and cleanup after partially failed memory population #168.