質問

I want to use WAL mode for the reason of performance and reliability. However my environment doesn't have mmap() function, so I can't compile SQLite with WAL (WAL needs mmap().). Although setting PRAGMA locking_mode=EXCLUSIVE allow use of WAL without mmap() (In this case, WAL-index is created on heap memory not shared file), it is not good solution for the applications that manage multiple database connections.

I use SQLite with multiple database connections (for inter-thread concurrency) in one process, and mmap() seems to be only used for inter-process memory sharing. Since I expect there is a way to use WAL without mmap() in single-process environment. But I can't find the good solution. Are there any ideas to solve this problem?

Thanks.

役に立ちましたか?

解決

The code in the SQLibrary always creates a memory-mapped file for the wal-index.

If you want to use WAL without mmap, you have to change that code to use a plain block of shared memory instead.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top