Breaking up with Mnesia
summary
Klarna migrates a 15-year Mnesia deployment to Postgres by adding a compatibility API and a distribution layer so both databases appear as one; built a proprietary KDB replication layer, a LevelDB Mnesia backend and index-as-tables hacks. Postgres mimics Mnesia serializability with advisory locks for missing rows and a custom transaction tester; property tests validate type encoding and ordering. Heavy batch jobs drop from ~48 hours to 5–6 hours after introducing multiops and optimizations; 5 TB restores into test complete in ~20 minutes.
AI-written summary · about
chapters (9)
- 0:0002:18 - Introduction
- 2:1906:51 - Problems with Mnesia
- 6:5211:04 - The road to Postgres : Migration Plan
- 11:0514:30 - The road to Postgres : Isolation Levels
- 14:3116:19 - The road to Postgres : Types
- 16:2018:04 - The road to Postgres : QLCs
- 18:0522:23 - The road to Postgres : Property based tests
- 22:2426:37 - Things we will mess from Mnesia
- 26:3836:58 - QnA
related talks
49mmnesia + leveldb (...)
43mJust Use Postgres.
25mCourting Mongo, committing to Postgres: Our data love story!
36mTales from the Postgres Front, and What We Can Learn
13mBuilding reliable infrastructure with Postgres
38mPerforming Databases Migrations Without Overtime
51mEmbrace, Extend, Evolve - Making PostgreSQL Work for a Cloud Native World
33mTransitioning from Debezium ElasticSearch to Postgres for Streamlined Resilience
