model-writtenrun 7710 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - Mar 2021 ยท 14 entries
- Markus Wanner opened the thread after finding that restarting decoding between PREPARE and COMMIT PREPARED resent the entire transaction, burdening consumers with duplicate filtering and retaining WAL #1.
- Amit Kapila explained that replay protected transactions prepared before the initial consistent snapshot, whose changes were absent from the initial copy, and demonstrated how reuse of another sender's serialized snapshot made that case difficult to distinguish from a restart after successful delivery #16; Robert Haas and Andres Freund emphasized that acknowledged data must not be resent #15 #20.
- Amit proposed avoiding serialized snapshots for two-phase slots #24, and Ajin Cherian implemented forced full snapshots in #26, while identifying a second correctness problem when users toggled two-phase decoding between calls.
- Markus supplied an independent patch that removed deferred PREPARE replay and preserved WAL ordering #27, but Amit warned that initial logical synchronization would then miss prepared transaction contents #28; Markus proposed additional synchronization outside the decoder #31, which Andres considered disproportionately complex #43.
- Andres rejected continual full-snapshot maintenance as too expensive #34 and proposed persisting the LSN where the slot originally became consistent #38; Amit and Andres clarified that prepares before that boundary must still be replayed at commit, independently of subsequently reused snapshots #42 #44.
- Amit also identified a broader subscriber problem involving prepared transactions skipped by both apply and table-sync workers, and discussed coordination alternatives without resolving that work in this thread #47.
- Ajin implemented the persistent-LSN approach together with a slot-creation-only two-phase option in #48, then split the replay fix and API change into separate patches in #49.
- Amit found that removing ReorderBufferSkipPrepare broke assumptions used by SnapBuildDistributeNewCatalogSnapshot and supplied a corrective patch with naming and comment changes #51; Ajin folded it in, updated documentation, and temporarily exposed the LSN in pg_replication_slots following Vignesh's review #50 #52.
- Vignesh reported passing make check and make check-world and confirmed the fix worked #54; Amit subsequently kept the LSN internal because it offered little lasting value to users, renamed it initial_consistent_point, and polished the first patch #56 #58.
- Amit added the required snapshot serialization-version bump and reviewed the API patch, requesting shared decoding-context gating, visibility of the two-phase flag, and deferral of replication-command syntax until it could be exercised #59; Ajin incorporated these changes in #62.
- Amit committed the first patch from #62 as 8bdb1332eb, with identical file contents and a commit-message typo correction, and announced that the slot-option patch remained #64.
- Review of the remaining API patch found missing parameter documentation and inconsistent initialization-time gating #63 #65; Ajin resubmitted the remainder with the initialization fix and two_phase naming cleanup in #66.
- Vignesh requested clearer catalog documentation #67, and Amit supplied the final revision with function documentation, revised comments, and formatting in #68; Vignesh then reported clean application and passing make check and make check-world #71.
- Amit committed #68 as 19890a064e, adding only the catalog-version bump, and confirmed the push in the final message #72, completing both selected patches while leaving replication-command support and broader subscription synchronization outside this series.