Re: Possible causes for database corruption and solutions - Mailing list pgsql-general

From Greg Smith
Subject Re: Possible causes for database corruption and solutions
Date
Msg-id 4B2909E7.10505@2ndquadrant.com
Whole thread Raw
In response to Re: Possible causes for database corruption and solutions  (Florian Weimer <fweimer@bfk.de>)
Responses Re: Possible causes for database corruption and solutions
List 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@2ndQuadrant.com  www.2ndQuadrant.com


pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: How to remove non-UTF values from a table?
Next
From: Tom Lane
Date:
Subject: Re: How to remove non-UTF values from a table?