Actions

System Administrator's Guide/PostgreSQL or MySQL?: Difference between revisions

From Mahara Wiki

< System Administrator's Guide
(Created page with "<span class="Apple-style-span" style="line-height: normal"> </span> The developers recommend '''PostgreSQL''' for maximum stability and data integrity. Properly tuned, Postgre…")
 
mNo edit summary
Line 1: Line 1:
<span class="Apple-style-span" style="line-height: normal"> </span>
[http://www.BlueBook.com]<span class="Apple-style-span" style="line-height: normal"> </span>


The developers recommend '''PostgreSQL''' for maximum stability and data integrity. Properly tuned, PostgreSQL will likely outperform MySQL anyway - we are using InnoDB tables for the transaction support.
The developers recommend '''PostgreSQL''' for maximum stability and data integrity. Properly tuned, PostgreSQL will likely outperform MySQL anyway - we are using InnoDB tables for the transaction support.

Revision as of 05:42, 24 August 2013

[1]

The developers recommend PostgreSQL for maximum stability and data integrity. Properly tuned, PostgreSQL will likely outperform MySQL anyway - we are using InnoDB tables for the transaction support.

Furthermore, PostgreSQL can do DDL in transactions - that is to say BEGIN; CREATE TABLE foo(bar int); ROLLBACK; actually works how you would expect. This makes the upgrade process a lot safer, if the upgrade fails you know you won't have left your database schema in a mess that can't be automatically upgraded once the original problem is fixed.

We cannot say this enough - even if you have never used PostgreSQL before, if you have the option to use it, then use it. You will save yourself a lot of hassle when your site needs upgrading, and the system will be more stable. Everyone who has used MySQL seriously is aware that sometimes MySQL corrupts tables, and performs badly under high load. PostgreSQL has none of these problems.

Here is a forum thread with a detailed explanation of this recommendation, and examples of where using Postgres is advantageous for Mahara.