bug fix: implicit transactions - #3070
Conversation
|
|
|
SummaryCoverage spans database transaction and session behavior across normal commits, explicit transaction boundaries, autocommit, synchronization, cross-connection visibility, streaming and batch failures, rollback, savepoint recovery, and connection reuse after errors. The exercised paths include both expected workflows and adversarial error cases, with healthy behavior observed throughout. Safe to merge — the run found no regressions, new failures, or previously flagged failures attributable to this PR, and all exercised transaction, recovery, and visibility behaviors passed. No merge-blocking application issues were identified. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |
|
A note on regressions: these new regressions are a consequence of the server now correctly implementing the semantics for a failed statement in the middle of a transaction block: all statements in a block from the failure until a COMMIT / ROLLBACK are discarded because the session is in an invalid state. I manually spot checked several of these regression failures to verify this was what was actually happening. This behavior has the effect of magnifying single-statement failures by marking every statement that follows until the end of the transaction as failed as well. This PR will establish a new baseline for correctness, and fixing the statements that currently fail will also cause the ones that follow it in the same transaction to succeed as well. |
|
Diff SummaryThe run covers database transaction behavior across successful multi-step work, automatic commits, explicit recovery, malformed or failing requests, duplicate writes, and cross-connection visibility. It exercises both normal flows and adversarial error cases, with the application consistently preserving atomicity, session recovery, and data isolation. Safe to merge — the exercised transaction and recovery behaviors show no PR-attributable regressions or new failures, and all observed results support correct behavior. No merge blocker is indicated by this run. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |
|
Diff SummaryThe run covers database write and transaction behavior across successful operations, failures, malformed or duplicate work, aborted transactions, rollback and recovery, and protocol timing around commit and synchronization. Overall, the exercised behavior is healthy across both normal flows and adversarial error-handling cases, though some previously passing scenarios were not covered in this run. Safe to merge — the exercised transaction, recovery, visibility, and protocol behaviors passed without regressions or PR-attributable failures. Previously passing but untested areas are a flag for later, not a merge blocker. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |
fulghum
left a comment
There was a problem hiding this comment.
Looks pretty solid! I tested a couple more cases locally and couldn't find an issue.

Postgres's rules for handling implicit transactions are subtle and diverge dramatically from MySQL's. This PR implements the correct semantics for implicit transactions:
There are lots of additional subtleties in this behavior, fully documented at https://www.postgresql.org/docs/current/protocol-flow.html