core
core copied to clipboard
Run `wal_checkpoint` during housekeeping
Otherwise WAL file may grow to 200M: https://github.com/deltachat/deltachat-core-rust/issues/6066#issuecomment-2427521864
Need to decide what type of wal_checkpoint to run, but probably TRUNCATE:
https://www.sqlite.org/pragma.html#pragma_wal_checkpoint
Before running it we should acquire all connections from the pool to make sure we don't run busy-handler. Then still better use block_on because some other process such as sqlitebrowser may open the database.