Well, so you are saying that I should use single transaction for the
"checkpoints"? Unfortunately, that wouldn't play really well with those
multiple database readers I mentioned - those readers would not see
changes done by the writer until the transaction finishes (which can be
several seconds in between the "checkpoints") and that is not an option.
Also, documentation states that:
> "If the application using SQLite crashes in the middle of a
transaction when the MEMORY journaling mode is set, then the database
file will very likely go corrupt"
Which is, as I mentioned not acceptable. Or, it depends, what is meant
by corruption here. As I mentioned, I can loose D from ACID in between
the checkpoints, I need the other ones.
Pavel
On 04/04/2018 07:15 PM, Simon Slavin wrote:
On 4 Apr 2018, at 3:01pm, Pavel Cernohorsky <pavel.cernohor...@appeartv.com>
wrote:
Hello, does anybody know if there is some possibility to not have WAL file as a
normal file on the disk, but only in memory? I understand that all the
modifications to the database would get lost in case of the application / OS
crash, but for my application, I only need the level of durability based on
checkpointing. I just need to guarantee that all the data are properly written
to the main database and synchronized to disk when manual (or even automatic)
WAL checkpoint is called, but I do not care if I loose data in between the
checkpoints. Of course database should never get corrupted.
You may be mistaking what checkpoints are for. They should not be used as an
ACID barrier.
In your situation, I recommend you use
PRAGMA journal_mode = MEMORY
and where you write 'checkpoint' above, that's where you do a COMMIT.
Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users