Skip to content

docs: the retried coroutine must own its whole transaction - #70

Merged
lesnik512 merged 1 commit into
mainfrom
docs/retry-owns-transaction
Oct 16, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
docs/retry-owns-transaction

Conversation

@lesnik512

Copy link
Copy Markdown
Member

#69 told readers the retried coroutine must open its own Transaction. That is narrower than the real rule. A serialization failure or a lost connection ends the whole Postgres transaction, so the retried coroutine must own that transaction from start to finish. Transaction is one way to do that, and a fresh session created inside the coroutine is another.

The README now states that rule and the reason for it. On a session another caller began, Postgres has already discarded the earlier statements, and SQLAlchemy's PendingRollbackError stops the retry from committing part of the work.

Docs only. The usage example and the API reference line are updated; no code changes.

@lesnik512
lesnik512 merged commit 270d4ba into main Oct 16, 2026
12 checks passed
@lesnik512
lesnik512 deleted the docs/retry-owns-transaction branch October 16, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant