model-writtenrun 6376 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported an assertion failure when a reused process retained a stale clogGroupNext value after concurrent transaction commits in #1, then supplied diagnostic and race-amplifying patches with a reproduction script in #2.
- Amit Kapila proposed resetting clogGroupNext to INVALID_PGPROCNO before the group-joining loop returns false in #3; Alexander supplied another stress script in #4, while vignesh C reported unsuccessful reproduction attempts with the original script and instrumentation in #5.
- Alexander confirmed in #6 that the proposed reset passed all 100 iterations in three runs and that the original failure reproduced on PostgreSQL 11, 12, 13, and master.
- Amit submitted the production fix in #7, adding the reset and a comment, and described a debugger-controlled three-session reproduction that verified the race and its resolution.
- Alexander verified that the attached fix resolved the issue on all affected branches in #8.
- Amit committed #7 with identical code as b786304c29, with backports through PostgreSQL 11, and confirmed the push in #9, leaving no outstanding work identified in the thread.