model-writtenrun 7191 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart proposed a dynamic shared memory registry in #1 so loadable modules could share named DSM segments without being preloaded at server startup; the implementation used a dshash table of segment handles and included a separate test module.
- Michael Paquier identified autoprewarm as a concrete user in #4: dynamically loaded pg_prewarm could otherwise consume unreserved main shared memory, and he also suggested a lookup-only registry operation.
- Andrei Lepikhov questioned keeping the registry in a separate file and returning DSM rather than DSA in #6; Robert Haas defended the separation in #8, and Nathan explained the fixed-size DSM use case in #9 and agreed to keep the registry separate in #11.
- Nikita Malakhov proposed detachment support in #7, but Nathan favored persistent segments matching startup-allocated memory and deferred cleanup callbacks until a concrete use case emerged in #10 and #19.
- Andrei and Bharath Rupireddy pushed for a more representative locking example in #15 and #16, while Bharath also questioned the caller-managed attachment pointer; Nathan's revision in #22 returned segment addresses directly, reused existing mappings, adopted integer-and-LWLock regression tests, added lookup support, and supplied the autoprewarm conversion.
- After correcting the regression test in #23, Nathan responded to Bharath's review in #24 by reducing key length to 64 bytes, removing unused lookup support, and cleaning up autoprewarm in #27; copyright and comment corrections followed in #29.
- Bharath reported an intermittent crash with a 10GB allocation in #24, and Nathan requested details to distinguish a registry defect from existing DSM behavior in #25; the thread contains no further diagnosis of that particular report.
- Bharath requested user documentation and discussed broader migration away from startup hooks in #30, while Amul Sul suggested a simpler API name in #31; Nathan accepted documentation and naming work but kept migration of other modules and changes to existing APIs outside this thread's scope in #32 and #33.
- Andrei supported named-segment terminology in #35, and Nathan noted its consistency with named LWLock APIs in #36; Michael also supported documentation while explaining why startup hooks remained useful in #37.
- Nathan's expanded series in #39 renamed the API to GetNamedDSMSegment(), documented runtime shared-memory allocation, and incorporated a separately discussed reorganization of the shared-memory and LWLock documentation as a prerequisite.
- Abhijit Menon-Sen's documentation corrections in #40 were incorporated in #42; Bharath then demonstrated invalid-input failures in #43, leading to explicit empty-name and zero-size errors in #44, while the found output remained mandatory because autoprewarm used it.
- After Bharath approved the final series in #45, the documentation prerequisite landed unchanged from #44 as 964152c476; it was also developed in thread #49025, whose matching submission #551217 preceded this thread's final copy.
- The registry implementation from #44 landed as 8b2bcf3f28 with additional tracking and validation of existing segment sizes, expanded comments, and error-reporting cleanup.
- The autoprewarm conversion landed unchanged from #44 as abb0b4fc03, and Nathan announced completion of the main series in #46.
- Tom Lane relayed a Coverity finding in #47: GetNamedDSMSegment() could dereference NULL when dsm_attach() failed; Nathan supplied a focused fix in #48 that raised ERROR and simplified the attachment branches.
- Michael and Bharath approved the fix in #49 and #50, and it landed unchanged as 4372adfa24; Nathan's final message #51 confirmed the fix was committed, leaving no submitted patches pending.