MCPcopy
hub / github.com/psycopg/psycopg / tpc_rollback

Method tpc_rollback

psycopg/psycopg/connection.py:552–557  ·  view source on GitHub ↗

Roll back a prepared two-phase transaction.

(self, xid: Xid | str | None = None)

Source from the content-addressed store, hash-verified

550 self.wait(self._tpc_finish_gen("COMMIT", xid))
551
552 def tpc_rollback(self, xid: Xid | str | None = None) -> None:
553 """
554 Roll back a prepared two-phase transaction.
555 """
556 with self.lock:
557 self.wait(self._tpc_finish_gen("ROLLBACK", xid))
558
559 def tpc_recover(self) -> list[Xid]:
560 self._check_tpc()

Calls 2

waitMethod · 0.95
_tpc_finish_genMethod · 0.80