Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: db corruption pg vs mysql



In response to "tim h" <timh(at)vyew(dot)com>:

> Hi. Im running one of my apps on mysql/myisam. db size: 7mil records, 5.8Gb.
> We've had some corruption problems, somehow the mysqld service failed
> corrupted the db.
> 
> For many reasons, but for this reason alone, im considering switching to
> pgsql sooner
> then planned. My question is... will this same problem happen in pgsql?

No.

> Is there a way to prevent or minimize corruption due to service or hardware
> failure?

The design of PostgreSQL considers your data extremely valuable.  As a result,
the system is very good about avoiding corruption, even in the event of
hardware failure.  The default configuration settings favor data
consistency.  Sometimes you will be encouraged to alter these settings for
a few % of performance improvement, but I don't recommend that you do so.

> also, will the use of Transactional queries prevent corruption, or is that a
> different issue?

Transactions prevent corruption because in the event of a hardware failure,
any half-committed transactions will be rolled back during recovery.  This
prevents the system from mangling your data.

An important thing to understand about the transaction model is that data
_loss_ may occur, but data corruption won't.

-- 
Bill Moran
http://www.potentialtech.com



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group