model-writtenrun 5893 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Paquier reported that PREPARE TRANSACTION could assert when a replication origin was configured without an origin LSN, and attached a fix replacing the assertion with a validity condition plus regression tests in #1.
- Masahiko Sawada questioned why PREPARE needed a validity check when commit and rollback accepted invalid origin LSNs without moving replication progress backward in #2.
- Michael explained that origin LSNs and timestamps were optional and that the two-phase header always contained their fields in #3; Amit Kapila recommended keeping the condition consistent with other transaction paths by checking only replorigin in #4.
- Michael accepted removing just the assertion in #5, explaining that either approach would produce an invalid LSN and zero timestamp in the case under discussion.
- Michael committed the revised fix from #1 as ece8c76192, with backpatching through PostgreSQL 11, and confirmed completion in #6, noting added rollback coverage and checks of decoded contents.