From: | Greg Smith <greg(at)2ndquadrant(dot)com> |
---|---|
To: | Florian Weimer <fweimer(at)bfk(dot)de> |
Cc: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Michael Clark <codingninja(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Possible causes for database corruption and solutions |
Date: | 2009-12-16 16:25:11 |
Message-ID: | 4B2909E7.10505@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Florian Weimer wrote:
> I hope that Mac OS X turns off write caches on low battery.
>
I've never heard of such a thing. The best you can do is try to push
the system into hibernation instead of going down hard. That *should*
clear any disk caches as part of the graceful shutdown. But you're
relying on a relatively fragile system now, once the battery is quite
low who knows if that will even execute in the window of time you have left.
> Improperly disconnected external drives are quite common and the
> effect mimics operating system crashes, but is it common to store
> PostgreSQL databases there? I don't think so.
>
I hope people don't do this. External Firewire and USB drives are the
worst possible place to store one's data at from a reliability point of
view. They usually don't pass through SMART errors that would let you
know when the drive is dying. They might not correctly honor write
cache calls, because a lot of bridge chipsets are cheap garbage that
support only the bare minimum of operations (see "don't pass through
SMART"). And if you're using a regular desktop drive in an external
enclosure, the expected lifetime before it dies is a fraction of a drive
that doesn't move around all day--note how small the warranties of such
items are compared to the same drive for internal use.
Recently I've started using 2.5" drives aimed at laptops, now that I can
get 500GB that way, with an E-SATA connector on them. That's the only
even remotely reliable external drive solution nowadays, because at
least you're guaranteed to get SMART data, cache flushes, and a drive
technology that's always been optimized for ruggedness.
--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-12-16 16:55:22 | Re: How to remove non-UTF values from a table? |
Previous Message | Raymond O'Donnell | 2009-12-16 16:07:46 | Re: How to remove non-UTF values from a table? |