model-writtenrun 3186 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Drew Callahan reported that a newly created logical slot could restore another slot's snapshot and begin decoding midway through an existing transaction, demonstrated partial replication, and proposed blocking restores with a creation flag in #1.
- Masahiko Sawada confirmed the bug on HEAD and all supported branches, requested an isolation test, and questioned the global variable and cleanup callback in #2; Drew responded with a context-local flag and tests in #3.
- Vignesh supplied a SnapBuild-local flag alternative in #4, and Sawada merged the two test proposals in #5, explaining that snapshot restoration selectively copies fields and need not restore the new flag.
- Sawada compared full-snapshot construction, snapshot-format compatibility handling and a global flag in #7, then supplied HEAD and PostgreSQL 16 implementations in #8 using a SnapBuild field and a global flag respectively.
- Hayato Kuroda connected a subtransaction assertion failure to the same race and implemented unconditional full-snapshot construction in #9, then removed unrelated edits in #10.
- Amit Kapila objected to tracking unnecessary non-catalog transactions in #11 and proposed selective snapshot restoration based on running transactions; Kuroda implemented an array-based prototype in #13 and reduced it to the highest running XID in #15 following Amit's review #14.
- Sawada demonstrated that an older catalog horizon still allowed partial decoding in #16, prompting Kuroda to replace the highest-XID check with creation-state and running-transaction flags in #17.
- Sawada proposed comparing the oldest transaction running at initialization with the WAL running-transaction horizon in #18, and Kuroda reported that its tests and the previously failing workload passed in #19.
- Sawada reconsidered the optimization in #20, arguing that restored snapshots could not establish a safe initial start point; discussion resumed in June with Amit's standby analysis in #21 and agreement that the arbitrary initial restart LSN required blocking restores in #22.
- Amit favored an explicit flag over full-snapshot overhead or an implicit xmin test in #23, and Sawada found that snapbuild.c could access the decoding context through reorder->private_data, producing the PostgreSQL 16 patch in #26, which Amit endorsed in #27.
- Sawada supplied separate HEAD and backbranch designs in #28, preserving snapshot-format compatibility on older releases and dropping Kuroda's assertion test because it exercised the same underlying fault.
- Michael Paquier recommended using the new snapshot format on PostgreSQL 17 as well as HEAD in #29, and Sawada agreed in #30; Kuroda then identified missing Meson registration, unused test objects and improper backbranch field placement in #31, leading to the all-branch revision #33.
- Amit reviewed flag initialization and explanatory comments in #34; Sawada moved the HEAD/PostgreSQL 17 flag into snapshot-builder initialization in #36, then removed a stale declaration and harmonized comments in #38 following #37.
- The supplied commit 1b37075877 implements the final backbranch variant from #38, using LogicalDecodingContext.in_create to prevent unsafe snapshot restoration and adding the isolation regression test; its exact identity with the unavailable attachment is inferred from the final review and push sequence.
- Sawada announced that the fix had been pushed to all supported branches in #39, and Michael acknowledged completion in #40; the thread ends with the fix landed and no remaining patch awaiting review.