Re: db corruption pg vs mysql

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: "tim h" <timh(at)vyew(dot)com>
Cc: pgsql-advocacy(at)postgresql(dot)org
Subject: Re: db corruption pg vs mysql
Date: 2007-05-22 19:06:50
Message-ID: 20070522150650.0e3e0b09.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

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

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message Joshua D. Drake 2007-05-22 19:09:36 Re: db corruption pg vs mysql
Previous Message tim h 2007-05-22 18:52:40 db corruption pg vs mysql