Search Postgresql Archives

Re: Why database is corrupted after re-booting

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

 



On Thu, Oct 27, 2005 at 02:54:50PM +0300, Andrus wrote:
> I have configuration like in my previous message. Hardware (IDE drive, 
> computer) and software (Windows XP) works according to vendor 
> specifications.
> 
> If I turn power off by breaking power cord when Postgres server is busy, is 
> it possible that
> after that SELECT * FROM anytable does not work ?

Lets put it another way:

1. If you are only doing SELECTs the chance anything will go wrong is
very small, because you're not actually writing anything.

2. If you are changing data and your disk faithfully and correctly
writes that data in the order it's told, then PostgreSQL can use the
WAL to recover, everything will work fine.

3. If your disk lies about writing data in the right order, 99% of
the time you will be fine, but that one time your uber-important data
is there, Murphy's law will kick in and trash it for you.

I've run PostgreSQL on all sorts of hardware, some of it not very good
and I've never lost any data or not had PostgreSQL come up properly
afterwards. But I just consider myself lucky. I've been on this list
long enough to see that bad things *do* happen with dodgy hardware. It
doesn't go wrong often. Even then, it's usually a single block
corrupted or an index that needs to be reindexed.

Note: I've always run on Linux system, which provides POSIX type
semantics for these things. I have *no* idea how much of this applies
to Windows.

Hope this helps,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgp1CESUQwkV6.pgp
Description: PGP signature


[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