Re: 8.3.5 broken after power fail

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, Michael Monnerie <michael(dot)monnerie(at)is(dot)it-management(dot)at>
Subject: Re: 8.3.5 broken after power fail
Date: 2009-02-17 09:34:50
Message-ID: dcc563d10902170134p53d4a994s1f769bcb526e49e5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

2009/2/17 Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>:
> Στις Tuesday 17 February 2009 10:54:52 ο/η Michael Monnerie έγραψε:
>
>> * your daughter with 3.5 years switching off the power supply of the
>> server
> 1st line of defense is to set your system to shutdown normally when the power button is pressed.
> 2nd line of defense is to get your self a decent UPS unit
>
> My daughter does this all the time on our family FreeBSD box. No probs.
>
> Also at work at more than 20 tanker vessels running 7.4.2, the captains do that on a constant
> basis and PgSQL always has survived (more than the rest of the system anyways..)

Those are all good to have. But no UPS is a replacement for hard
drives / RAID controllers / file systems that don't lie about fsync.

Nothing makes your database shine like being the only one in the
hosting center that survives sudden catastrophic power failure.

>> What can I do?

tether your daughter to the other side of the room? I'm not sure
which parts of those mount options are dangerous or not. I use ext3
stock with noatime. And a battery backed RAID. Smaller slower work
group / station controllers (i.e. 5 year old server conrollers) go for
pretty cheap and give pretty good performance with 2 or 4 drives.

AS for fixing it, I believe the answer involves creating a clog file
full of zeros 16Meg or so, and pg_reset_xlog. Don't count on all your
data being there or all your FK-PK type relationships to be correct,
Immediately dump it, initdb and reload your data, fixing it as you go.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Monnerie 2009-02-17 11:08:21 Re: 8.3.5 broken after power fail
Previous Message Achilleas Mantzios 2009-02-17 09:12:31 Re: 8.3.5 broken after power fail