Transaction States — Active, Partially Committed, Committed, Aborted

Transaction States — Active, Partially Committed, Committed, Aborted A lifecycle diagram generated by Archify. Transaction Durability work Undo and retry Terminal Active · reading and writing · Transaction · nothing is durable yet 01 Active reading and writing nothing is durable yet Partially Committed · COMMIT requested · Transaction · actions finished 02 Partially Committed COMMIT requested actions finished Flushing to Disk · WAL and fsync in progress · Durability work · the critical moment Flushing to Disk WAL and fsync in progress the critical moment Committed · changes are durable · Transaction · cannot be undone 04 Committed changes are durable cannot be undone Failed · error or abort request · Undo and retry · must be cleaned up Failed error or abort request must be cleaned up Aborted · all writes rolled back · Terminal · nothing happened Aborted all writes rolled back nothing happened In Doubt · crash before the commit record · Durability work · log decides on restart In Doubt crash before the commit record log decides on restart COMMIT make writes durable commit record written error or ROLLBACK undo the writes crash or disk full crash mid-flush commit record found no commit record application retries Legend initial state active waiting decision success failure / exit final state