Tom Keffer <[email protected]> writes: > Not clear what you're asking, but I'd like to know more about the > corruption of the database. I spent a lot of time making sure that commits > were atomic. Did I miss something? Could you be more specific about what's > wrong with the database?
I am assuming you mean that you are using database transactions, with autocommit off and begin/end transaction. I am curious if people believe: sqlite properly turns transactions into filesystem writes and fsync calls (am guessing yes) if various OS kernels on various platforms properly turn filesystem write and fsync into hardware write operations that reflect completion status all the way back to the fsync call if the actual uSD cards have internal transactions and accurate completion status reporting, so that if a block reports as complete and no new write is started to that block, it's guaranteed present after power loss It feels difficult to get the entire stack correct, and I admit to being a bit skeptical. And +1 for Doug's recommendation of ups-nut. Also, if your UPS lasts only 8 minutes, it isn't big enough. While there are a fair number of short glitches up to maybe 15 second outages (for me, 3x 2s with periods back on at most), my experience then jumps to 25 minutes, if you are exceeding lucky (lineman and truck are on duty, in town, and not committed, and your problem is the only one), to maybe an hour for not quite so lucky. After that all bets are off. That's a long way of saying that it's best if your UPS can run for somewhat over an hour. But whatever it can do, it's good to have automatic shutdown. When UPS shopping, proper automated shutdown with guaranteed restart when power returns (or better yet, after the battery is recharged) is one of the trickiest things to get right. But that's a topic for the NUT lists/docs. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/rmiwnd11x86.fsf%40s1.lexort.com.
signature.asc
Description: PGP signature
