model-writtenrun 5449 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Konstantin Knizhnik reported that a transaction marked committed in CLOG could remain in the process array, allowing cached status checks to produce inconsistent visibility results and an uncommitted-tuple error; he supplied a subtransaction workload and an artificial-delay reproducer in #1.
- Robert Haas emphasized checking transaction progress before commit status in #4, but Andres Freund showed that TransactionIdIsInProgress() itself could populate the misleading cache during subtransaction checks, and that pg_xact_status() offered another trigger in #5; he also warned that synchronous replication widened the dangerous window in #6.
- Simon Riggs argued for preserving caching performance in #7 and supplied two alternatives in #8: a separate progress cache alone, or that cache plus a TransactionLogFetch() safeguard; Andres demonstrated that the safeguard incorrectly hid aborted subtransactions in #13.
- Andres proposed a unified transaction-status API while noting that such a redesign would not be backpatchable in #9, reproduced the failure with synchronous replication in #10, and supplied a deterministic pg_xact_status() sequence in #11; Simon defended the smaller cache fix as suitable for backpatching in #12.
- After a four-month gap, Heikki Linnakangas supplied a TAP reproducer and endorsed Simon's simpler fix in #14, proposing to correct pg_xact_status() and remove TransactionIdIsKnownCompleted() only on the development branch; he explained that correcting pg_xact_status() would invalidate the reproducer, so the test was left out.
- Andres discussed how an isolation test could obtain the transaction ID and responded to Heikki's proposed resolution in #15; Heikki then posted the combined implementation in #16, retaining Simon's cache while inlining its lookup and adding the pg_xact_status() correction.
- Heikki raised a pre-existing cache hazard involving XID wraparound in #16, and Simon approved the patch while recommending that wraparound concerns be handled separately for PostgreSQL 15 and later in #17.
- Heikki committed #16 as adf6d5dfb2 with only comment reflow and commit-message refinements, then confirmed the commit and backpatches in #18; the reported visibility fix was complete, while the separate wraparound concern remained unresolved in this thread.