News for hackers. Stuff that matters.
Re:A faster way to copy SQLite databases between computers by jmull on Thursday May 01, 2025 @10:11AM (#43857932)
If the corruption is detectable and infrequent enough for your purposes, then it does work, with a simple “retry until success” loop. (That’s how TCP works, for example.)
Re:A faster way to copy SQLite databases between computers by benbjohnson on Thursday May 01, 2025 @01:51PM (#43861043)
Not all corruption is detectable. You could make a copy during a transaction where only a subset of the transactions saved pages are persisted but all branch & leaf pages are pointed to correctly. That would give you a state of the database that never actually existed and break atomicity.
Re:A faster way to copy SQLite databases between computers by jmull on Thursday May 01, 2025 @03:38PM (#43862387)
> Not all corruption is detectable.

Well, I don't know rsync that well. If you're saying it doesn't detect changes to files while it's being copied, then I'll believe you.

And, as far as I know, it's impossible to detect absolutely all corruption.

But you can pretty easily detect, e.g., that a file has or has not changed since before you copied it to after, on a system with a basically functioning filesystem and clock, with a reasonable/useful level of confidence.