model-writtenrun 1782 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- vignesh C reported that conflicting publication column lists could leave RelationSyncCache pointing into freed memory after a SQL decoding error, and proposed calling FreeDecodingContext() from PG_CATCH in #1.
- Zhijie Hou warned that FreeDecodingContext() could invoke user code and raise another error before essential cache invalidation completed, recommending a memory-context reset callback in #2; vignesh C adopted that approach in #3.
- Masahiko Sawada proposed moving RelationSyncCache into PGOutputData and identified a separate streamed_txns memory leak in #4, but vignesh C explained that registered invalidation callbacks could outlive the decoding context because they cannot be unregistered in #5.
- Masahiko Sawada accepted retaining the existing cache ownership and supplied a lightly revised patch with an expanded explanation in #6; Euler Taveira confirmed that it fixed both the reported failure and a generated-column case, while suggesting shared cleanup code in #7.
- Masahiko Sawada identified that cleanup should be registered on the decoding context and kept the streamed_txns leak for a separate patch in #8; vignesh C incorporated the callback-context correction and cleanup reuse in #9, followed by Masahiko Sawada's cosmetically aligned master-through-15 submissions in #10.
- vignesh C supported extending the backport to PostgreSQL 13 and asked about adding a regression test in #11, but Euler Taveira advised against PostgreSQL 13 and 14 because the demonstrated bug did not affect them and PostgreSQL 13 was approaching its final release in #12; Masahiko Sawada accepted that restriction and added its rationale to the commit message in #13.
- Masahiko Sawada committed the final submission from #10 as b46efe9048, with the additional backport rationale, and announced that it had landed on master through PostgreSQL 15 in #14.
- vignesh C reported successful buildfarm runs and closed the Commitfest entry in #15, completing this fix; the separate streamed_txns leak remained outside its scope, and no automated regression test was included in the committed change.