Closed ruslandoga closed 11 months ago
Some issues that come to mind that will need to be explored.
sqlcipher
compiled with the library? We'll need to be able to pass configurations for it.I wish we had a better benchmarking harness to compare using two database handles opened vs just one.
@warmwaffles
select load_extension(..., ...)
or any runtime configuration (via pragmas) would need to be called on both dbs, not great.def load_extension(conn, extension) dp
with {:ok, _} <- query(conn, "select load_extension(#{extension})"),
{:ok, _} <- read_query(conn, "select load_extension(#{extension})"), do: :ok
end
I wish we had a better benchmarking harness to compare using two database handles opened vs just one.
I'll prepare some benchmarks for the three approaches:
Closing this PR as it's too complicated. But I'm still trying to find a good replacement for the current db_connection
approach :)
Hah, it's not a problem. I'll find some time to really dive into this more.
This PR is similar to #255 but instead of making writes exclusive it opens two databases, one for writing and one for reading. This allows for reads to continue being served while the write is happening thanks to WAL: