model-writtenrun 1924 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jingtang Zhang reported growing SMgrRelation memory in a standby's startup process during repeated table creation and dropping, proposing to export smgrdestroy() and call it from DropRelationFiles() in #1.
- Thomas Munro examined prepared-transaction callers and dangling-reference safety, requesting explanatory comments and test coverage in #2; Jingtang reported no memory growth in a prepared-transaction test and added lifetime documentation in #3.
- Jingtang identified that freeing only dropped relations would still leave startup-process objects accumulating during table creation in #4, and Yuhang Qiu suggested periodic cleanup when replaying checkpoint records in #5.
- Jingtang replaced the original approach with smgrdestroyall() after online checkpoint replay in #6, then added shutdown checkpoint replay in #7 after recognizing that a standby's startup process may continue running afterward.
- Yuhang approved the final patch in #8, and Michael Paquier reported measuring the hash-table growth and supported cleanup outside RecoveryRestartPoint(), promising application and backpatching in the thread's last message, #9.
- Michael subsequently committed #7 as 8c8f7b199d with comment and commit-message edits, completing the fix with backpatches through PostgreSQL 17.