On 11 Oct 2012, at 5:38pm, Nico Williams <n...@cryptonector.com> wrote:
> There is something you can do: use a combination of COW on-disk > formats in such a way that it's possible to detect partially-committed > transactions and rollback to the last good known root This is actually the problem, not the solution. Traditional disk drivers for spinning disks change the order in which they write things to disk. They will buffer several write commands up and notice that on the way to moving the write head to do write #1 the write head will pass over the correct spot to do write #4, so they will do write #4 first. Many disks will do this even with the disk jumpers set to enforce in-order writing: they lie. If you try to puzzle out how to do ACID under these conditions you'll realise it's not possible. You absolutely need a write barrier (e.g. fsync() ) of some kind. You need a write barrier to do in-order writing, you need in-order writing to do checkpoints, you need checkpoints to do transactions and you need transactions to do database management. There is some hope that with the rise of solid state drives (SSD) new disk drivers and file system code will be written to correctly enforce in-order writing. I have been told about a version of Linux which does this but haven't had time to play with it yet and find out if it's fast enough to use as a conventional desktop computer. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users