Skip to main content
DriverPackageTx typeAtomic insertNotes
PostgreSQL (pgx v5)driver/pgxv5pgx.Tx✅LISTEN/NOTIFY, lease leadership, SKIP LOCKED
PostgreSQL / MySQL / MariaDB / SQLitedriver/stdlib*sql.Tx✅pgx stdlib, go-sql-driver/mysql (MySQL 8, MariaDB 10.6+), modernc sqlite
gormdriver/gorm*gorm.DB✅thin adapter over stdlib
bundriver/bunbun.Tx✅thin adapter over stdlib
MongoDB 4.0+driver/mongodbv2*mongo.Session (mongo-driver v2)✅replica set required
MongoDB 4.0+ (deprecated)driver/mongodbmongo.SessionContext (mongo-driver v1)✅use driver/mongodbv2
Redisdriver/redisNoTx❌at-least-once; Pub/Sub notifications
Cassandra 3.11+driver/cassandraNoTx❌LWT claiming; ScyllaDB / DSE compatible
ClickHouse 23+driver/clickhouseNoTx❌ReplacingMergeTree; at-least-once
Amazon DynamoDBdriver/dynamodbNoTx❌conditional writes; at-least-once
Cloud Firestoredriver/firestore*firestore.Transaction✅RunTransaction; composite index required
In-memorydriver/memorymemory.NoTx❌synchronized operations, no rollback; for tests

Transaction guarantees by backend#

BackendGuaranteeMechanism
Postgres / MySQL / SQLiteAtomic with business txSame DB connection, same BEGIN/COMMIT
gorm / bunAtomic with business txExtracts underlying *sql.Tx
MongoDBAtomic with business txMulti-document transaction on replica set
RedisNone — at-least-oncePub/Sub + idempotent workers
CassandraNone — at-least-onceLWT for claiming; no cross-statement tx
ClickHouseNone — at-least-onceReplacingMergeTree + FINAL; no transactions
DynamoDBNone — at-least-onceConditional writes; no cross-table tx
FirestoreAtomic with business txRunTransaction + EnqueueTx
In-memoryAtomic (in-process)Single mutex