model-writtenrun 4932 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Maxim Orlov reported intermittent logical-decoding assertions and possible crashes caused by accessing InitialRunningXacts after its memory context was freed, supplied a diagnostic reproducer, and suggested moving the allocation to TopMemoryContext in #1.
- Andres Freund acknowledged the problem in #2, and Amit Kapila explained in #4 that restarting decoding in the same session could reuse stale globals; he rejected TopMemoryContext allocation because it would leak memory and recommended resetting the pointer and count.
- Masahiko Sawada supplied the fix in #6, resetting both globals when freeing the snapshot builder and asserting that they are empty when allocating another builder, together with a proposed isolation test involving slot recreation.
- Maxim reported successful testing but questioned the new test's reliability and PostgreSQL 11 compatibility in #7; Amit agreed that existing tests covered the scenario in #8, so Sawada removed the added test and reported verification across supported branches in #9.
- After Maxim confirmed the revised patch in #10, Amit posted a lightly polished version in #11; it became 9b788aafdc with identical code and an expanded commit message explaining why HEAD was unaffected.
- Amit confirmed the push for PostgreSQL 11 through 15 in #12, and Sawada closed the commitfest entry in #14, leaving the fix landed with the additional test intentionally omitted.