4

For a large production Drupal 6 site using mysql, I am wondering

  • Is it realistically feasibly to convert to postgresql?
  • What are the pros/cons of using postgresql instead of mysql?
  • Does the conversion worth the effort?
  • What is the easiest way to do so?

Thanks

5
  • 1
    Can you explain why you're considering moving to postgres? Commented May 8, 2011 at 19:53
  • If you're going to switch DBs for performance reasons, and have the ability to change server software, I'd suggest you look into MariaDB - drop in replacement for the MySQL binary. Commented May 8, 2011 at 19:55
  • @James, I am hoping to achieve some performance boost. Commented May 8, 2011 at 19:58
  • @David, it's the first time that I hear about MariaDB, thanks for the clue. Commented May 8, 2011 at 20:01
  • 1
    Drupal (especially Drupal 6) isn't really optimized to work with PostgreSQL and there is no guarantee that all your contrib modules will work with PostgreSQL (Most do, but there are always bugs or accidental use of MySQL only SQL syntax). I think you're better off improving the performance of your MySQL server. See for example drupal.stackexchange.com/questions/1715/… Commented May 8, 2011 at 23:22

3 Answers 3

1

Here's a few fresh links that might help you along:

http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL
http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL

http://dbconvert.com/convert-mysql-to-postgresql-pro.php
http://railsonpostgresql.com/2010/10/20/converting-rails-apps-from-mysql-to-postgresql

Most of the links on google are pretty old though and contain very outdated info, so beware.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Johan for the links, actually I skimmed over some of them but what but I'd like to see is some first hand experience focusing on Drupal.
@qliq, I only found a 2004 link on drupal, not very relevant to 2011 MySQL I'm afraid.
1

I've used this tool to successfully dump a mysql db to a postgres import file.

http://sqlfairy.sourceforge.net/

Comments

1

What are the pros/cons of using postgresql instead of mysql?

The PostgreSQL Optimizer is much better, much better datatype support, faster for anything advanced like triggers/ etc. , really ACID compliant (not like InnoDB which is a fake), triggers on views, good GIS support, lots of advanced stuff and much much more

Is the conversion worth the effort?

No, Drupal is not about advanced SQL and you should not see much improvement switching from MySQL to PostgreSQL, and as already mentioned you would lose some compatibility (i.e. everyone uses mysql for drupal more or less).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.