Transactions
Transactions
Full ACID-compliant transaction support with distributed capabilities.
Overview
HeliosDB provides comprehensive transaction support including:
- Full ACID compliance
- Multiple isolation levels
- Distributed transactions with 2PC
- Savepoints and nested transactions
- XA transaction support
Quick Start
-- Basic transactionBEGIN; UPDATE accounts SET balance = balance - 100 WHERE id = 1; UPDATE accounts SET balance = balance + 100 WHERE id = 2;COMMIT;
-- With savepointsBEGIN; INSERT INTO orders (customer_id, total) VALUES (1, 500); SAVEPOINT before_items; INSERT INTO order_items (order_id, product_id) VALUES (1, 100); -- Rollback to savepoint if needed ROLLBACK TO SAVEPOINT before_items;COMMIT;
-- Serializable isolationBEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -- Conflicts automatically detectedCOMMIT;Isolation Levels
| Level | Description | Performance |
|---|---|---|
| READ UNCOMMITTED | Dirty reads allowed | Fastest |
| READ COMMITTED | Default, no dirty reads | Fast |
| REPEATABLE READ | Snapshot isolation | Good |
| SERIALIZABLE | Full serializability | Safe |
Features
| Feature | Description |
|---|---|
| Savepoints | Partial rollback within transaction |
| Distributed 2PC | Two-phase commit across nodes |
| XA Transactions | External transaction coordinator support |
| Deadlock Detection | Automatic deadlock resolution |
| Lock-Free MVCC | High concurrency without blocking |
Related
- MVCC:
/docs/features/mvcc/ - Deadlock Prevention:
/docs/guides/user/DEADLOCK_PREVENTION_OPERATIONS_GUIDE.md
Status: Production Ready Version: v7.0