symfonic.memory.backends.postgres_working_transaction¶
postgres_working_transaction ¶
Bounded replay of a host's complete PostgreSQL Working write.
WorkingTransactionUncertain ¶
Bases: RuntimeError
Control/cleanup acknowledgement missing; never proof of rollback.
run_working_read
async
¶
Own a bounded read-only readback; no retry and no caller transaction.
Source code in src/symfonic/memory/backends/postgres_working_transaction.py
run_working_transaction
async
¶
run_working_transaction(pool: Any, write: Callable[[Any], Awaitable[_Result]], *, deadline_at: float | None = None) -> _Result
Replay only a deadlocked body after confirmed whole-transaction rollback.
write must run every database statement on conn (directly or through
this exact pool's task-bound connection), never another pool or connection.
It must contain the complete database write and no external effects,
audit publication, transaction control, or committed-state readback. It may
run three times. Ambient transactions are refused: a savepoint cannot replay
earlier owner admission or release the caller's earlier locks. Commit and
rollback errors propagate without replay, including uncertain outcomes.