|
|
|
|
|
by theoryofx
443 days ago
|
|
> First implementation used an SQLite database (with WAL log) – only to find it corrupted after just couple of days of extensive power on/off cycles. Did you try setting `PRAGMA synchronous=FULL` on your connection? This forces fsync() after writes. That should be all that's required if you're using an NVMe SSD. But I believe most microSD cards do not even respect fsync() calls properly and so there's technically no way to handle power offs safely, regardless of what software you use. I use SanDisk High Endurance SD cards because I believe (but have not fully tested) that they handle fsync() properly. But I think you have to buy "industrial" SD cards to get real power fail protection. |
|