model-writtenrun 4726 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Geoghegan reported that pg_walinspect accumulated text allocations while returning many WAL records, potentially exhausting memory despite using a tuplestore, and suggested periodically resetting a separate memory context #1.
- Andres Freund identified two additional StringInfo leaks per record and argued that a memory context reset after every row was the manageable solution #2.
- Bharath Rupireddy submitted development-branch and PostgreSQL 15 fixes using a temporary context reset after each output tuple, included the full-page-image function on the development branch, and reported substantially reduced memory use while processing roughly 35 million records #4.
- Michael Paquier endorsed the approach and confirmed the full-page-image risk, while Jeff Davis proposed extending the same cleanup pattern to GetXLogSummaryStats() #5 #6.
- Bharath explained that the full-page-image function first appeared in PostgreSQL 16 and reported constant memory use for statistics queries; Jeff clarified that summary generation still allocates memory, although its bounded iteration count prevents growth with WAL volume #7 #8.
- Jeff committed the submitted fix with additional GetXLogSummaryStats() cleanup as 69e8c7cf1d and reported applying the PostgreSQL 15 variant unchanged; Michael's final acknowledgment left no outstanding work identified in the thread #8 #9.