model-writtenrun 7106 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Nov - Dec 2024 ยท 15 entries
- Michael Paquier opened the thread with a reproducible WAL-sender memory leak, crediting Jeff Davis with identifying publication names missed by list_free_deep(), and proposed embedding each name in Publication despite the ABI implications #1.
- Alvaro Herrera proposed resetting a dedicated memory context instead, avoiding the ABI change; Michael tested that approach and combined it with his original HEAD-only structure cleanup #3 #4.
- Amit Kapila questioned the context ownership and suggested explicit publication cleanup, while Alvaro objected to fixed-size name storage; Michael consequently replaced the two-patch proposal with FreePublication() #5 #7 #8 #12.
- Amit identified a second failure mode involving repeated SQL logical-decoding calls, and Zhijie Hou reproduced it, demonstrating that allocations must end with the decoding context rather than survive in CacheMemoryContext #16 #18.
- Alvaro advocated a dedicated context in PGOutputData, and the discussion converged on that design for HEAD while retaining concerns about changing public structure layouts in stable branches #21 #22 #24 #25 #26.
- Hou supplied the decoding-owned context implementation, Sawada endorsed it, and Euler's review led to a smaller allocation size and the pubctx name #32 #34 #35 #36.
- Michael committed the publication-list fix as f0c569d715 from #36, changing only a field comment and the commit description, and announced that stable-branch work remained #38.
- Sawada identified another SQL-decoding leak in relation attribute maps, and Michael also raised concerns about streamed-transaction allocations; Amit proposed handling the attribute-map issue separately #40 #42 #43.
- For stable branches, Michael proposed adapting Alvaro's block-static context approach, and Vignesh supplied versions for the differing branch layouts; Michael's initial review found the publication-cache changes reasonable #41 #44 #45.
- Amit questioned retaining the context under CacheMemoryContext and suggested a reset callback, while Sawada proposed file-static storage initialized during startup; Hou pointed out that ERROR paths skip the shutdown callback #46 #47 #49 #50.
- Vignesh moved the attribute-map issue to a separate thread with a reproducer, leaving publication-list backport design as the active work here #51.
- Sawada supplied three alternative backport implementations, comparing a block-static context passed through LogicalDecodingContext with file-static approaches with and without a reset callback #54.
- Michael rejected leaving a potentially dangling static pointer, Amit preferred clearing it through a reset callback, and Sawada agreed on the callback-based file-static alternative #55 #58 #59 #60.
- The thread ended with Michael reporting that the publication-list fix had been applied across all five stable branches after sysbench and SQL-decoding tests, completing the backports of f0c569d715 using the callback-based alternative from #54 with added comments #63.
- The attribute-map issue reported in #40 and handed off in #51 was subsequently fixed by c9b3d4909b, which allocates the map in data->cachectx; that commit belongs to the later submission #578930 in thread #50727, and its commit message deferred treatment for versions 13 and 14.