Suggestions for SQLite features:

1. It would be nice to have read-only transactions for use with WAL
databases.  When a read-only transaction was started, it would take a
"lock" on the WAL and then not advance further into the WAL until the
transaction ended.  Thus, all select statements issued while the read
transaction was open would see all writes that had been committed prior to
the start of the read transaction, but would not see any writes that are
not yet committed when the read transaction is started or writes that start
or complete while the read transaction is open.  This would apply to all
(multiple) select statements that would all see the same view of the data
during the duration of the read transaction.

2. It would be nice if the WAL operation did not require anything more than
passive checkpoints, and had a mechanism to restart or truncate the WAL
even in the presence of a steady stream of reads and writes.  One possible
way to do this would be to use two WAL files and "ping-pong" between
them--writes would go to one WAL file while the other is being fully
checkpointed and reset, after which the WAL files switch roles and the
empty WAL written to while the full one is checkpointed.

3. It would be nice if there were an in-memory mode for WAL databases that
could be shared by multiple database connections on multiple threads (or
possibly multiple processes) and that had the benefits of "multi-version
concurrency" but the data was kept entirely in memory, and no disk files
were created except possibly temporary files to map shared memory, etc.

There might be a way to do some or all of this already that I didn't see or
understand when reading the documentation, but if not, I think these would
be valuable additions.

Reply via email to