# \#mnesia

**URL:** https://erlangforums.com/tag/mnesia/240.md

[Latest](https://erlangforums.com/latest.md) · [Categories](https://erlangforums.com/categories.md) · [Tags](https://erlangforums.com/tags.md)

---

## [Mnesia fragmentation of external storage (leveldb) tables?](https://erlangforums.com/t/mnesia-fragmentation-of-external-storage-leveldb-tables/6044)

<div class="topic-metadata">

**Author:** [@Chlorophil](https://erlangforums.com/u/Chlorophil)\
**Replies:** 1\
**Last updated:** [October 16, 2026, 11:33am UTC](https://erlangforums.com/t/mnesia-fragmentation-of-external-storage-leveldb-tables/6044 "2026-10-16T11:33:31Z")

</div>

Howdy all, it’s been a while! Has anyone managed to use Mnesia fragmented tables with external storage tables? I’m currently using OTP 29.1.1 (erts-17.1, according to erlang:system\_info(system\_version). I was playing a…

---

## [Mnesia\_rocksdb - fast and scalable mnesia backend](https://erlangforums.com/t/mnesia-rocksdb-fast-and-scalable-mnesia-backend/4834)

<div class="topic-metadata">

**Author:** [@uwiger](https://erlangforums.com/u/uwiger)\
**Replies:** 15\
**Last updated:** [August 11, 2026, 7:11am UTC](https://erlangforums.com/t/mnesia-rocksdb-fast-and-scalable-mnesia-backend/4834 "2026-08-11T07:11:40Z")

</div>

The mnesia\_rocksdb backend plugin offers support for very large disk-based tables in mnesia. It also offers a low-level access API, enabling efficient use of the Rocksdb access APIs while using Mnesia as the management f…

---

## [Best approach for high-frequency stock updates in Mnesia](https://erlangforums.com/t/best-approach-for-high-frequency-stock-updates-in-mnesia/5411)

<div class="topic-metadata">

**Author:** [@vrannangi](https://erlangforums.com/u/vrannangi)\
**Replies:** 0\
**Last updated:** [February 4, 2026, 3:56pm UTC](https://erlangforums.com/t/best-approach-for-high-frequency-stock-updates-in-mnesia/5411 "2026-02-04T15:56:01Z")

</div>

Hi all, I’m building an app using Erlang/Yaws with Mnesia. I have an item record that stores product info including stock quantity: -record(item, { id, % String store\_id, % String name, …

---

## [What backend is used in mnesia for on-disk or memory and disk tables?](https://erlangforums.com/t/what-backend-is-used-in-mnesia-for-on-disk-or-memory-and-disk-tables/4717)

<div class="topic-metadata">

**Author:** [@coder-001](https://erlangforums.com/u/coder-001)\
**Replies:** 4\
**Last updated:** [May 6, 2025, 8:24am UTC](https://erlangforums.com/t/what-backend-is-used-in-mnesia-for-on-disk-or-memory-and-disk-tables/4717 "2025-05-06T08:24:16Z")

</div>

I have read on the elixir forum that mnesia retired dets for disk storage due to its size limitation. And I just wanted to know what is being used now. Thank you :smiley:

---

## [What is the protocol used in mnesia for table replication?](https://erlangforums.com/t/what-is-the-protocol-used-in-mnesia-for-table-replication/4726)

<div class="topic-metadata">

**Author:** [@coder-001](https://erlangforums.com/u/coder-001)\
**Replies:** 1\
**Last updated:** [May 4, 2025, 12:59pm UTC](https://erlangforums.com/t/what-is-the-protocol-used-in-mnesia-for-table-replication/4726 "2025-05-04T12:59:46Z")

</div>

How does the protocol work? Does the node with the new entry send it to the other node all by itself? Or is there a table with the machines each node is responsible for updating? I couldn’t find anything with regards t…

---

## [How does Mnesia compare to Postgres?](https://erlangforums.com/t/how-does-mnesia-compare-to-postgres/4396)

<div class="topic-metadata">

**Author:** [@PCOM](https://erlangforums.com/u/PCOM)\
**Replies:** 8\
**Last updated:** [January 19, 2025, 9:46am UTC](https://erlangforums.com/t/how-does-mnesia-compare-to-postgres/4396 "2025-01-19T09:46:03Z")

</div>

So I’m coming from a world of almost exclusively PERN stacks and, when comparing the “P” (postgres) to Mnesia… Postgres just seems like a superior, more catastrophically tolerant system. What do I mean by that? Well, b…

---

## [QLC sort in Mnesia by several fields?](https://erlangforums.com/t/qlc-sort-in-mnesia-by-several-fields/4227)

<div class="topic-metadata">

**Author:** [@Kozaky](https://erlangforums.com/u/Kozaky)\
**Replies:** 1\
**Last updated:** [November 30, 2024, 9:26pm UTC](https://erlangforums.com/t/qlc-sort-in-mnesia-by-several-fields/4227 "2024-11-30T21:26:06Z")

</div>

Hi! I’m trying to use Mnesia as the database for my small project and I’m currently trying to implement a cursor based pagination following this article: https://medium.com/@george\_16060/cursor-based-pagination-with-arb…

---

## [Most reliable way to create a mnesia table if it doesn’t exist](https://erlangforums.com/t/most-reliable-way-to-create-a-mnesia-table-if-it-doesn-t-exist/3969)

<div class="topic-metadata">

**Author:** [@peerst](https://erlangforums.com/u/peerst)\
**Replies:** 2\
**Last updated:** [September 2, 2024, 3:05pm UTC](https://erlangforums.com/t/most-reliable-way-to-create-a-mnesia-table-if-it-doesn-t-exist/3969 "2024-09-02T15:05:56Z")

</div>

Best Practices for Creating a Mnesia Table if None Exists on Startup Hi everyone, we are currently working on an Erlang application that uses Mnesia for its embedded database, and I’m looking for the best way to handle …

---

## [Having Difficulty Adding a Node to mnesia](https://erlangforums.com/t/having-difficulty-adding-a-node-to-mnesia/3298)

<div class="topic-metadata">

**Author:** [@rneswold](https://erlangforums.com/u/rneswold)\
**Replies:** 20\
**Last updated:** [July 11, 2024, 1:02pm UTC](https://erlangforums.com/t/having-difficulty-adding-a-node-to-mnesia/3298 "2024-07-11T13:02:34Z")

</div>

Hello Erlang Community, I’m hoping someone who’s familiar with mnesia can help me solve this problem. Several years ago, we received two Dell servers. We set up our Erlang-based process on both. One was configured as a…

---

## [Cannot install fallback. No disc resident schema on local node](https://erlangforums.com/t/cannot-install-fallback-no-disc-resident-schema-on-local-node/3713)

<div class="topic-metadata">

**Author:** [@alexandr](https://erlangforums.com/u/alexandr)\
**Replies:** 1\
**Last updated:** [June 14, 2024, 8:42am UTC](https://erlangforums.com/t/cannot-install-fallback-no-disc-resident-schema-on-local-node/3713 "2024-06-14T08:42:19Z")

</div>

Hello all! Trying to create mnesia schema remotely, from one node on another. Haven’t been doing it few years. Totally forgotten the details of this process. Could someone refresh in my memory the cause of this errors: …

---

## [mnesia restore when node name changes](https://erlangforums.com/t/mnesia-restore-when-node-name-changes/3592)

<div class="topic-metadata">

**Author:** [@tuksgig](https://erlangforums.com/u/tuksgig)\
**Replies:** 3\
**Last updated:** [May 6, 2024, 11:50am UTC](https://erlangforums.com/t/mnesia-restore-when-node-name-changes/3592 "2024-05-06T11:50:03Z")

</div>

Hi All, I’m looking for some advice please. What would be the easiest way to automate the mnesia restore process when the nodename changes? I have an ejabberd mnesia database backup file where the nodename was set to ‘…

---

## [Implementing mnesia transactions behavior by dirty operations](https://erlangforums.com/t/implementing-mnesia-transactions-behavior-by-dirty-operations/3302)

<div class="topic-metadata">

**Author:** [@Abdelghani](https://erlangforums.com/u/Abdelghani)\
**Replies:** 2\
**Last updated:** [February 17, 2024, 5:33am UTC](https://erlangforums.com/t/implementing-mnesia-transactions-behavior-by-dirty-operations/3302 "2024-02-17T05:33:44Z")

</div>

Hello, is it possible to implement transaction behavior by dirty operations in mnesia ? I have a situation where Iam using only dirty operations with “1 worker per key” (phash2) and everything is fine, but there are so…

---

## [How does data replication work in Mnesia?](https://erlangforums.com/t/how-does-data-replication-work-in-mnesia/3204)

<div class="topic-metadata">

**Author:** [@Abdelghani](https://erlangforums.com/u/Abdelghani)\
**Replies:** 7\
**Last updated:** [January 25, 2024, 5:10am UTC](https://erlangforums.com/t/how-does-data-replication-work-in-mnesia/3204 "2024-01-25T05:10:39Z")

</div>

Hello everybody, I have a couple of questions concerning Mnesia : 1- How data replication works by default ? is writting require full locking of the table ? If so then we will lost all performance gained by Dirty oper…

---

## [Performance: ets vs. dets/mnesia for infrequent persistence to disk](https://erlangforums.com/t/performance-ets-vs-dets-mnesia-for-infrequent-persistence-to-disk/3214)

<div class="topic-metadata">

**Author:** [@TD5](https://erlangforums.com/u/TD5)\
**Replies:** 2\
**Last updated:** [January 23, 2024, 9:40am UTC](https://erlangforums.com/t/performance-ets-vs-dets-mnesia-for-infrequent-persistence-to-disk/3214 "2024-01-23T09:40:25Z")

</div>

Hi folks, I currently have a few large (tot. ~50GB) ets tables. I’ve optimised operations on them a lot, and the performance I get with them is decent. One bottleneck I have, however, is persisting to disk. My workflow …

---

## [Khepri - a tree-like replicated on-disk database library for Erlang and Elixir (introduction & feedbacks)](https://erlangforums.com/t/khepri-a-tree-like-replicated-on-disk-database-library-for-erlang-and-elixir-introduction-feedbacks/438)

<div class="topic-metadata">

**Author:** [@dumbbell](https://erlangforums.com/u/dumbbell)\
**Replies:** 81\
**Last updated:** [August 31, 2023, 8:54am UTC](https://erlangforums.com/t/khepri-a-tree-like-replicated-on-disk-database-library-for-erlang-and-elixir-introduction-feedbacks/438 "2023-08-31T08:54:54Z")

</div>

Hi! On behalf of the RabbitMQ team, I’m proud to announce the Khepri database library! Khepri is a tree-like replicated on-disk database library for Erlang and Elixir. This is a library we plan to use inside RabbitMQ a…

---

## [Insert a record into Mnesia only if its key doesn't exist yet](https://erlangforums.com/t/insert-a-record-into-mnesia-only-if-its-key-doesnt-exist-yet/2811)

<div class="topic-metadata">

**Author:** [@peerst](https://erlangforums.com/u/peerst)\
**Replies:** 2\
**Last updated:** [August 21, 2023, 4:49pm UTC](https://erlangforums.com/t/insert-a-record-into-mnesia-only-if-its-key-doesnt-exist-yet/2811 "2023-08-21T16:49:59Z")

</div>

I want to insert a record into a Mnesia table only when it doesn’t exist yet avoiding race conditions: if two processes try to add the same key only one should succeed. There is the mnesia:wread/1 function which is just…

---

## [Where can I find Erlang-specific details on the possible return types for Mnesia:create\_table?](https://erlangforums.com/t/where-can-i-find-erlang-specific-details-on-the-possible-return-types-for-mnesia-create-table/2700)

<div class="topic-metadata">

**Author:** [@scherrey](https://erlangforums.com/u/scherrey)\
**Replies:** 8\
**Last updated:** [June 23, 2023, 6:37am UTC](https://erlangforums.com/t/where-can-i-find-erlang-specific-details-on-the-possible-return-types-for-mnesia-create-table/2700 "2023-06-23T06:37:39Z")

</div>

Trying to get details on the possible return types for Mnesia:create\_table. Erlang docs are basically absent: Erlang -- mnesia Elixir docs actually have the answer that I’m looking for! Mnesia · Elixir School Am I mis…

---

## [Mnesia new feature for eventual consistency with CRDT](https://erlangforums.com/t/mnesia-new-feature-for-eventual-consistency-with-crdt/1953)

<div class="topic-metadata">

**Author:** [@CuSO4](https://erlangforums.com/u/CuSO4)\
**Replies:** 7\
**Last updated:** [May 20, 2023, 11:57am UTC](https://erlangforums.com/t/mnesia-new-feature-for-eventual-consistency-with-crdt/1953 "2023-05-20T11:57:43Z")

</div>

Hi, I am thinking about adding a new eventual consistency model for Mnesia. In particular, this is trying to address the question that when we are doing dirty async operations on Mnesia, according to the doc: “notice th…

---

## [Mnesia User Properties - is there a way to update the properties after a table has been created?](https://erlangforums.com/t/mnesia-user-properties-is-there-a-way-to-update-the-properties-after-a-table-has-been-created/2535)

<div class="topic-metadata">

**Author:** [@vances](https://erlangforums.com/u/vances)\
**Replies:** 1\
**Last updated:** [April 10, 2023, 10:01am UTC](https://erlangforums.com/t/mnesia-user-properties-is-there-a-way-to-update-the-properties-after-a-table-has-been-created/2535 "2023-04-10T10:01:31Z")

</div>

We found the mnesia:create\_option() {user\_properties, proplists:proplist()} useful for identifying tables which were dynamically created by our application. Is there really no way to update the properties after a table …

---

## [How does mnesia sync disc\_copies with other nodes / PCs?](https://erlangforums.com/t/how-does-mnesia-sync-disc-copies-with-other-nodes-pcs/2478)

<div class="topic-metadata">

**Author:** [@harancoh](https://erlangforums.com/u/harancoh)\
**Replies:** 5\
**Last updated:** [March 24, 2023, 8:23am UTC](https://erlangforums.com/t/how-does-mnesia-sync-disc-copies-with-other-nodes-pcs/2478 "2023-03-24T08:23:55Z")

</div>

I want to back up my app using Mnesia so if the main node fails it could be restarted on another PC. So far I succeeded in connecting the main node to other nodes and their Mnesia, but I can’t make the remote nodes save…

---

## [Need help creating a mnesia table index](https://erlangforums.com/t/need-help-creating-a-mnesia-table-index/2486)

<div class="topic-metadata">

**Author:** [@phoeniuxlpr](https://erlangforums.com/u/phoeniuxlpr)\
**Replies:** 3\
**Last updated:** [March 22, 2023, 11:01pm UTC](https://erlangforums.com/t/need-help-creating-a-mnesia-table-index/2486 "2023-03-22T23:01:40Z")

</div>

Why the first element of a record can’t be used as table index? This is not working: (hlu@192.168.0.40)16\> rd(pilot, {id, name, weight, phone}). pilot (hlu@192.168.0.40)17\> mnesia:create\_table(pilot, (hlu@192.168.0.40)…

---

## [Distributed app using rebar3, backed up with Mnesia](https://erlangforums.com/t/distributed-app-using-rebar3-backed-up-with-mnesia/2395)

<div class="topic-metadata">

**Author:** [@harancoh](https://erlangforums.com/u/harancoh)\
**Replies:** 3\
**Last updated:** [February 22, 2023, 7:31pm UTC](https://erlangforums.com/t/distributed-app-using-rebar3-backed-up-with-mnesia/2395 "2023-02-22T19:31:16Z")

</div>

I have a release using rebar3 which is composed of several apps (server, fsm, mnesia…). I would like to make the system fault tolerant by creating another node with mnesia to make sure the data is backed up and ready to…

---

## [Mnesia, match specs, and partial row updates](https://erlangforums.com/t/mnesia-match-specs-and-partial-row-updates/1942)

<div class="topic-metadata">

**Author:** [@max-au](https://erlangforums.com/u/max-au)\
**Replies:** 2\
**Last updated:** [October 26, 2022, 4:14am UTC](https://erlangforums.com/t/mnesia-match-specs-and-partial-row-updates/1942 "2022-10-26T04:14:10Z")

</div>

mnesia (and ETS) APIs kept backwards compatibility with very old OTP versions (before maps were supported in ERTS). I wonder if there are alternatives, or alternative APIs being developed. For example, a better match sp…

---

## [Mnesia schema migration best practices when an application is upgraded and mnesia tables need to change?](https://erlangforums.com/t/mnesia-schema-migration-best-practices-when-an-application-is-upgraded-and-mnesia-tables-need-to-change/1890)

<div class="topic-metadata">

**Author:** [@kuna.prime](https://erlangforums.com/u/kuna.prime)\
**Replies:** 2\
**Last updated:** [October 9, 2022, 5:14am UTC](https://erlangforums.com/t/mnesia-schema-migration-best-practices-when-an-application-is-upgraded-and-mnesia-tables-need-to-change/1890 "2022-10-09T05:14:21Z")

</div>

My question is what is the best practice or your experience when an application is upgraded and mnesia tables need to change? Do you have some OTP process like gen\_server that is there only for this purpose(code\_change …

---

## [Mnesia table creation on disc not ram?](https://erlangforums.com/t/mnesia-table-creation-on-disc-not-ram/1915)

<div class="topic-metadata">

**Author:** [@olegzil](https://erlangforums.com/u/olegzil)\
**Replies:** 3\
**Last updated:** [October 8, 2022, 2:48pm UTC](https://erlangforums.com/t/mnesia-table-creation-on-disc-not-ram/1915 "2022-10-08T14:48:37Z")

</div>

For full disclosure, I’m new to Erlang. I am trying to create a mnesia table on disc not ram. This code does so successfully.: initialize\_mnesia() -\> mnesia:stop(), application:set\_env(mnesia, dir, "/tmp/star\_w…

---

## [How to create mnesia table based on a variable record?](https://erlangforums.com/t/how-to-create-mnesia-table-based-on-a-variable-record/1793)

<div class="topic-metadata">

**Author:** [@Abdelghani](https://erlangforums.com/u/Abdelghani)\
**Replies:** 2\
**Last updated:** [August 29, 2022, 5:26am UTC](https://erlangforums.com/t/how-to-create-mnesia-table-based-on-a-variable-record/1793 "2022-08-29T05:26:36Z")

</div>

Hello everyone, I have the problem how to create mnesia table based on a variable record, for example: case Record of 'record1'-\> mnesia:create\_table('record1', \[{attributes, record\_info(fields, 'record1')}\] ; 'record…

---

## [Social Media Following Implementation using Mnesia?](https://erlangforums.com/t/social-media-following-implementation-using-mnesia/1757)

<div class="topic-metadata">

**Author:** [@Abdelghani](https://erlangforums.com/u/Abdelghani)\
**Replies:** 8\
**Last updated:** [August 24, 2022, 12:15pm UTC](https://erlangforums.com/t/social-media-following-implementation-using-mnesia/1757 "2022-08-24T12:15:00Z")

</div>

Hello everybody I hope you are all fine and in good health condition, Consider we have a social media database that we want to implement via Mnesia (key-\>value table), each record represents a person and each person is …

---

## [How to backup a live mnesia database?](https://erlangforums.com/t/how-to-backup-a-live-mnesia-database/1737)

<div class="topic-metadata">

**Author:** [@derekzhou](https://erlangforums.com/u/derekzhou)\
**Replies:** 2\
**Last updated:** [August 12, 2022, 2:39pm UTC](https://erlangforums.com/t/how-to-backup-a-live-mnesia-database/1737 "2022-08-12T14:39:58Z")

</div>

Backup is a common requirement for a database system. In postgresql, for example, I can use pg\_basebackup, which would cause a small runtime performance hit for the database during the backup to ensure the verbatim copy …

---

## [Maximum number of parallel processes](https://erlangforums.com/t/maximum-number-of-parallel-processes/1723)

<div class="topic-metadata">

**Author:** [@Abdelghani](https://erlangforums.com/u/Abdelghani)\
**Replies:** 10\
**Last updated:** [August 7, 2022, 4:47pm UTC](https://erlangforums.com/t/maximum-number-of-parallel-processes/1723 "2022-08-07T16:47:57Z")

</div>

Hi everybody, consider we have a pool of processes that handle a mnesia table and we access each process by hashing the key, I think the maximum number of these processes for the best performance is the number of cores …

---

## [Need help understanding using async\_dirty instead of Transactions](https://erlangforums.com/t/need-help-understanding-using-async-dirty-instead-of-transactions/1410)

<div class="topic-metadata">

**Author:** [@Abdelghani](https://erlangforums.com/u/Abdelghani)\
**Replies:** 1\
**Last updated:** [May 7, 2022, 5:00pm UTC](https://erlangforums.com/t/need-help-understanding-using-async-dirty-instead-of-transactions/1410 "2022-05-07T17:00:41Z")

</div>

Hello everyone, I watched Rick Reed’s video about scaling Whatsapp Server and about Parallelizing the Mnesia Database he said : “we were doing mostly async\_dirty and to give us much consistency as possible since we don’…

[Next page](https://erlangforums.com/tag/mnesia/240.md?match_all_tags=true&page=1&tags%5B%5D=mnesia)
