model-writtenrun 7416 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund opened the thread after Michael Paquier and Thomas Munro reported snapshot assertions, explaining that clearing KnownAssignedXids before declaring recovery complete could produce empty snapshots and potentially corrupt visibility decisions; he proposed delaying recovery cleanup in #1.
- Andrey Borodin described possibly related production corruption in #2; Andres suggested comparing affected page LSNs with promotion times in #3, and Andrey offered to investigate in #4, but the thread never established a connection.
- Tom Lane reported another buildfarm assertion in a parallel worker in #5, and Andres explained in #6 that it reflected the same premature KnownAssignedXids cleanup.
- Michael reproduced the backwards-moving snapshot horizon and posted #7, initially preferring to retain prepared transaction entries in KnownAssignedXids because he was concerned about delaying standby lock release.
- Andres explained in #8 that retaining those entries was insufficient because other recovery resources also needed to remain intact; Michael then posted #9, moving the entire recovery cleanup after the recovery-state transition following code inspection and testing.
- After several months, Michael rechecked standby handling and snapshot construction and proposed applying the revised fix in #10.
- Michael committed #9 with light comment edits as 8a4237908c, with backports through PostgreSQL 9.6, and reported further testing and completion in #11; Andres acknowledged the fix in #12, leaving no patch outstanding.