Search Postgresql Archives

Re: Possible causes for database corruption and solutions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx  www.2ndQuadrant.com


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux