This is steering off topic, but, here's my deal with computers as a whole.
Bluntly, I love them, I can't be without them, and I wouldn't change my
experiences with them for anything.  That doesn't mean that I implicitly
trust them.

My expectations are "low" because experience has taught me to keep them low
in the 30 years I've been dealing not only with software but hardware as
well going back to the Vic-20.  I was 8 when we got that machine, and by 9
I was already tearing it apart to "see how it worked".  I don't think my
parents ever found out though.... {smirks at the good ol' days}  I've seen
pretty funky things with computers, especially when it comes to flaky
electricity supplies.  I only point that out because this thread originated
on the statement "Pulled the plug".

At my old job as a repair tech at a mom-and-pop computer shop for 6 years,
I've had my hand on literally thousands of computers, and except for the
very few times when I was to build a few at the same time, they were all
unique.  I've had situations with customers machine who literally didn't
like the "taste" of electricity at the owners house, but would work
flawlessly on my work bench.  I set that machine, and one other I had
laying around up at the customers house, and hers failed to work while in
the OS while mine started no problem.  Possible reason is power sags and
power spikes affected the PSU.  I don't remember what I did with that
machine afterwards.  (I might have the notes still in my database).  When
you yank that power cord, and who knows which way that read/write head is
going to go, let alone what kind of condition the rest of your hardware is
going to be at.  You may think that yanking the power cord is the end all
and say all, but there are sparks of electricity that jump between the
connector plate and the plug in the PSU, and THAT is what causes the
unknowns.

Right now, at work, I have an external drive plugged in via ESATA so that I
can keep my own OS instead of sharing an OS with the other gents that use
that machine.  I'm looking at odd electrical problems with it right now,
probably because of the constant power switching over the past 3 years I've
been running it.  I have to let that drive spin up, warm up for a few
minutes, power it off, then back on, THEN turn the computer on.  I've
ALWAYS treated that drive and enclosure with the respect it needs as there
are no computer shops open 24/7.  I've never lost data, but, now I'm having
problems with it in a cold state.  So yes, again another reason to lower
that expectation bar.

I'm the kind of tech that doesn't use the PSU power switch to power off a
machine that is in a bad state unless I absolutely have to.  Soft power it
off with the power button for 4 seconds.  Only then would I use the PSU
power switch, or, yank the cable of the supply didn't have a switch.

I'm pretty firm with my statement of "You pull that plug, all bets are off".

All software depends on hardware.  You yank that plug, you have an unknown
state until you bring it up.  Power surges and sags are evil to computer
hardware.

On Mon, Feb 1, 2016 at 10:14 AM, Howard Chu <hyc at symas.com> wrote:

Stephen Chrzanowski wrote:
>
> Your expectations are pretty low. On a properly configured Unix host,
> there's no reason for a powerfail to prevent a successful reboot. E.g., if
> you mount boot and root filesystems as read-only filesystems, they can
> never get corrupted. If you're using modern filesystems for your writable
> partitions (e.g., FSs with journaling) then there's also no reason for them
> to fail to come back online.
>
> So it just comes down to your application code being reliable.
>
> I should note that SQLightning has none of the problems being described in
> this thread - in its default mode, it is full-ACID and a powerfail cannot
> lose data or corrupt the database. And it does all this while being at
> least 30% faster on writes than vanilla SQLite.
>
> Yes, the OS could have bugs. Yes, the hardware could physically fail.
> That's pretty rare though; HDDs R/W heads auto-retract on powerfail so
> unless the entire mechanism actually jammed, there's no way for a powerfail
> to cause a head crash or any other destructive event.
>
> Bottom line - if your OS reboots successfully, there's no excuse for your
> database to not also come up successfully, fully intact.
>
> --
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to