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

From Michael Clark
Subject Re: Possible causes for database corruption and solutions
Date
Msg-id bf5d83510912160616p54df57d6kbec112d1a19fa69a@mail.gmail.com
Whole thread Raw
In response to Re: Possible causes for database corruption and solutions  (Florian Weimer <fweimer@bfk.de>)
List pgsql-general


On Wed, Dec 16, 2009 at 5:41 AM, Florian Weimer <fweimer@bfk.de> wrote:
* Craig Ringer:

> On 16/12/2009 3:54 PM, Florian Weimer wrote:
>> * Michael Clark:
>>> and with no power protection, then I expect it does. Add laptop
> users with ageing/flakey batteries, laptops let go flat after they
> go into powersave suspend, etc, and you're sure to see plenty of
> cases of apparent crashes.

I hope that Mac OS X turns off write caches on low battery.


OS X is relatively smart at dealing with batteries.  For example, on newer (last 2-3 years maybe) laptops when the battery hits a critical low level it automatically hibernates the machine (different from sleep), where the machine state is saved to disk and then shut off.

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.


For us, no, we do not allow the PG data store to be moved off the root volume (which I guess could be an external drive if booted from one).
But this article talks a bit about external drives, to paraphrase, a lot of external firewire drives disable the command that allows the fsync_writethrough from working (yikes)


Michael.

pgsql-general by date:

Previous
From: akp geek
Date:
Subject: Objects / Procedure creation date or modified date
Next
From: Brian Modra
Date:
Subject: Re: Objects / Procedure creation date or modified date