Re: Why database is corrupted after re-booting

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Why database is corrupted after re-booting
Дата
Msg-id 4360B732.8010405@archonet.com
обсуждение исходный текст
Ответ на Re: Why database is corrupted after re-booting  ("Andrus" <eetasoft@online.ee>)
Список pgsql-general
Andrus wrote:
> My problem: Sometimes I need also to run desktop (server and client in same
> desktop computer)  applications with Postgres.
> Desktop computer have this config. It is not  possible to force users to buy
> SCSI drives nor upses for each desktop computer.
> Can Firebird or SQLLite automatically recover from power failure?

If data on your disk gets corrupted then NOTHING can guarantee to
recover your database - not PG, not Firebird, not Oracle.

PostgreSQL writes all transactions to a log (WAL) before reporting them
as committed. If your system tells the truth about when data is actually
written to disk, then it can use this WAL to find out what happened when
the system stopped and make sure the database is in a consistent state.

Now, if your WAL gets corrupted then obviously there's not much PG can
do about it - that's why it's vital to make sure that write caching is
off, so PG can guarantee that something written to disk is actually there.

Now, since you're not going to control your clients' hardware, and
probably can't guarantee their settings either you'll have to accept a
greater risk of data loss than with good quality hardware you specify
yourself. There are steps you can take to protect their data though -
running on NTFS, telling them to switch write caching off and, I would
suggest looking into running a PITR setup on the same machine.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Problem with SSL and postgreSQL 8.0.4
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: missing FROM clause ?