Re: Why database is corrupted after re-booting

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Andrus <eetasoft(at)online(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why database is corrupted after re-booting
Date: 2005-10-26 16:21:18
Message-ID: 1130343678.2872.26.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2005-10-26 at 10:27, Andrus wrote:
> Yesterday computer running Postgres re-boots suddenly. After that,
>
> select * from firma1.klient
>
> returns
>
> ERROR: invalid page header in block 739 of relation "klient"
>
> I have Quantum Fireball IDE drive, write caching is turned OFF.
> I have Windows XP with FAT32 file system.
> I'm using PostgreSQL 8.0.2 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
> 3.4.2 (mingw-special)
>
> Why the corruption occurs ? How to avoid data corruption?
> Will NTFS file system prevent all corruptions ? If yes, how to convert FAT32
> to NTFS without losing data in drive ?

If your machine crashes, FAT makes no promises that it will come back
up, uncorrupted or otherwise.

NTFS has journaling, and should provide more safety.

Turning off the write cache is the right thing to do. Putting your db
on FAT is the (very very) wrong thing to do.

I would run the ntfs converter if I were you, but you'll likely need a
backup to get your database back on its feet again. Don't forget the
backups.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2005-10-26 16:27:04 Re: Why database is corrupted after re-booting
Previous Message Ken Johanson 2005-10-26 16:16:37 Re: escape string type for upcoming 8.1