Hey, I've been chasing some performance issues in the Guix Build Coordinator and thought that the size of the WAL file was a contributing factor. I believe SQLite checkpoints the WAL file after transactions commit, if the WAL is over 1000 pages in size. At least for the Guix Build Coordinator though, that didn't seem to be working/happening as the WAL file seemed to just grow and grow. I think I'm making some progress on that. It seems that if you don't reset or finalise statements after you're finished with them, bad things happen. I think one of these bad things is that WAL checkpointing stops happening. When I got that to happen in the Guix Build Coordinator, I'm no longer seeing errors when I try and manually run checkpoints now. Switching focus to Cuirass, I think it's got similar issues. I've pushed a few commits to this branch [1], the important one being [2] which rewrites a few procedures to call sqlite-reset when the statement is finished with, rather than calling it before starting to read from the statement. 1: https://git.cbaines.net/guix/cuirass/log/?h=sqlite-statement-reset-fixes 2: https://git.cbaines.net/guix/cuirass/commit/?h=sqlite-statement-reset-fixes&id=e09bc606f25bad11b39c9fae49139ac03b88697c If this makes sense, I can spend the time writing some changelog entries for the commits, and push them. What do you think? Thanks, Chris