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…") |
m (Reverted edits by Luis paulo vieira (Talk) to last revision by WikiSysop) |
||
(One intermediate revision by one other user not shown) |
Latest revision as of 19:03, 27 March 2014
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.