model-writtenrun 2237 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Rahila Syed opened the thread with a fix for a resource-owner error found by Fujii Masao during memory-reporting testing, proposing that DSM/DSA operations use a NULL owner when the current owner is releasing #1.
- Rahila added injection-point regression coverage #2, and Daniel Gustafsson revised her patch to simplify unpinning, generalize the injection-point name, and share test code, initially proposing backpatching only to versions supporting injection-point tests #3.
- Rahila questioned silent unpinning failure and possible disagreement between DSM and DSA resource owners #4; Daniel deferred an API signature change until a later release, requested a reproducer for the owner mismatch, and posted small implementation adjustments #5.
- Robert Haas argued that callers must supply valid resource owners #6, while Michael Paquier warned against hiding ownership assumptions inside DSM/DSA #7, leading Daniel to agree to rework the approach #8.
- Robert explained that memory reporting performed unsafe operations at arbitrary interrupt checks and could leak resources, proposing reversion or redesign #9; Rahila suggested temporarily clearing CurrentResourceOwner around the caller's DSA operations #10, and Mihail Nikalayeu reported encountering the same error with injection points #11.
- After discussing the problem with Rahila, Daniel replaced the low-level workaround with a guard that skipped reporting in aborted transactions, returning previous statistics when available, and added a TAP reproducer plus a summary-indexing fix #12.
- Tom Lane then reported leaks into TopMemoryContext and criticized the placement of substantial reporting machinery in mcxt.c, recommending removal for PostgreSQL 18 #13; Daniel accepted this as a release blocker and posted a full feature revert #14.
- Daniel committed that revert as fb844b9f06, with extra include cleanup and preservation of the existing memory-statistics starting level, then confirmed completion #15; the attempted fixes were superseded, and the commit records an intent to revisit the feature for PostgreSQL 19.