model-writtenrun 686 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Kirill Reshke reported excessive session memory usage while checking a GIN index and supplied a patch freeing prev_tuple before replacing it during entry-tree traversal #1.
- Ewan Young reproduced the problem and confirmed the fix worked, while suggesting an optional follow-up to free the last retained tuple on each page #2.
- Michael Paquier agreed that tuple copies could accumulate despite the dedicated memory context and planned to measure the effect on a large index #3.
- Kirill supplied debugger evidence showing frequent CopyIndexTuple() allocations while checking a 34 GB GIN index, but had not prepared a synthetic reproducer #4.
- Michael committed the original patch unchanged as e939332c6b and announced backpatching through PostgreSQL 18 #5; the submitted fix was complete, while Ewan’s optional per-page cleanup was not included and received no further discussion.