Re: db corruption pg vs mysql - Mailing list pgsql-advocacy

From Bill Moran
Subject Re: db corruption pg vs mysql
Date
Msg-id 20070522150650.0e3e0b09.wmoran@potentialtech.com
Whole thread Raw
In response to db corruption pg vs mysql  ("tim h" <timh@vyew.com>)
List pgsql-advocacy
In response to "tim h" <timh@vyew.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

pgsql-advocacy by date:

Previous
From: "tim h"
Date:
Subject: db corruption pg vs mysql
Next
From: "Joshua D. Drake"
Date:
Subject: Re: db corruption pg vs mysql