Remix.run Logo
dathinab 2 days ago

Some things:

- there is an official check sum VFS shim, but I never used it and don't know how good it is. The difference between it and WAL checksum is that it works on a per page level and you seem to need manually run the checksum checks and then yourself decide what to do

- check sums (as used by SQLite WAL) aren't meant for backup, redundancy or data recovery (there are error recovery codes focused on allowing recovering a limited set of bits, but they have way more overhead then the kind of checksum used here)

- I also believe SQLite should indicate such checksum errors (e.g. so that you might engage out of band data recovery, i.e. fetch a backup from somewhere), but I'm not fully sure how you would integrate it in a backward compatible way? Like return it as an error which otherwise acts like a SQLITE_BUSY??

ncruces 2 days ago | parent [-]

The checksum VFS explicitly disables its checksums during checkpointing (search of inCkpt): https://sqlite.org/src/doc/tip/ext/misc/cksumvfs.c

Data in the WAL should be considered to be of "reduced durability".