3 ms·
A gotcha, if you are expecting compatibility with sqlite. You can't set PRAGMA journal_mode=WAL and expect to be able to read database state from another proces
by kleton 8mo ago
A gotcha, if you are expecting compatibility with sqlite. You can't set PRAGMA journal_mode=WAL and expect to be able to read database state from another process. Turso will report exclusive lock
- sealeck 8mo agoI thought the point of Turso was to offer better concurrency than SQLite currently does. A la https://turso.tech/blog/beyond-the-single-writer-limitation-with-tursos-concurrent-writes https://turso.tech/blog/beyond-the-single-writer-limitation-... and https://penberg.org/papers/penberg-edgesys24.pdf https://penberg.org/papers/penberg-edgesys24.pdf Would be great if one of the Turso developers can clarify :)
- bawolff 8mo agoHonestly, if you care about that level of concurrency, it begs the question of why are you using an in process database in the first place?
- miohtama 8mo agoOne reason is that architecture and maintenance are much simpler
- sealeck 8mo agoIt's not just about performance: having an in-process MVCC engine would simplify the implementation of many single-machine concurrent applications. Currently you usually have to combine SQLite with some kind of concurrency primitives; this is extremely painful because most OS-level concurrency primitives are really easy to misuse (e.g. it's trivial to accidentally add deadlocks, and very hard to spot and remove these ahead of time: example hard to spot concurrency bugs https://fly.io/blog/corrosion/ https://fly.io/blog/corrosion/, https://rfd.shared.oxide.computer/rfd/400 https://rfd.shared.oxide.computer/rfd/400)