Search Postgresql Archives

Re: Why database is corrupted after re-booting

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

 



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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[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