model-writtenrun 7836 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- 范孝剑(康贤) reported that SnapBuildSerialize failed to free its allocated snapshot buffer, causing walsender memory growth and eventual out-of-memory failure when standby snapshots were logged frequently #1.
- Amit Kapila agreed that the allocation should be freed and requested a reproducible workload to explain when the leak became substantial #2.
- 范孝剑(康贤) supplied a reproducer that repeatedly created and dropped logical replication slots while another session streamed logical changes, generating frequent standby snapshot records #3.
- Amit Kapila reproduced the problem and posted a tested fix that initialized ondisk to NULL and freed it at the common exit label, proposing backpatching through PostgreSQL 9.5 #4.
- The patch landed unchanged as ee1b38f659, with backports through PostgreSQL 9.5, and Amit Kapila closed the thread by confirming the push #5.