WordPress and PostgreSQL (part 1)

Well, I just ran into what I con­sid­er a major road­block or maybe a fork in the road. I real­ly want to move to using PostgreSQLexternal_link exclu­sive­ly, drop­ping MySQLexternal_link. But WordPressexternal_link is basi­cal­ly being writ­ten for MySQL exclud­ing all oth­er data­bas­es. This means I either have to give up on using PostgreSQL exclu­sive­ly or give up using WordPress. And so the pon­der­ing pro­ceeds.

I guess I have to exam­ine why I want to go to PostgreSQL exclu­sive­ly and the corol­lary that WordPress can be replaced by some­thing else. Gonna start with the advan­tages and dis­ad­van­tages of both PostgreSQL and MySQL.

MySQL is the sim­ple solu­tion. It is well sup­port­ed by every­thing I want to use includ­ing WordPress and Drupal. It has a large devel­op­ment com­mu­ni­ty despite its recent pass­ing of hands first to Sun and now to Oracle. I have been using it for a long time (long enough I can’t remem­ber how long, some­time before 2000). I know how to use it, con­fig­ure it, opti­mize it. I can write its own form of SQL with­out much need to refer to the MySQL doc­u­men­ta­tion. A lot of my old php code is writ­ten specif­i­cal­ly for MySQL although my per­son­al php frame­work is  now writ­ten using PDO so I have some abstrac­tion going there. With the lat­est ver­sions of MySQL, it has final­ly reached a lev­el of ACIDityexternal_link that I want, trans­ac­tions etc.

On the oth­er hand, MySQL is now owned by Oracle. I real­ly don’t like the direc­tion they have already tak­en it, mak­ing the com­mu­ni­ty ver­sion almost impos­si­ble to find on their web­site. The Developer Zoneexternal_link has been buried. This puts a seri­ous black cloud over MySQL future as an open source project in my opin­ion.

MySQL always felt lack­ing in some way. It still doesn’t have some fea­tures I would like it to have. Although it is get­ting clos­er to stan­dard based SQL, it has a ways to go in some areas. There are lit­tle nig­gly things that make me look else­where. In oth­er  words, I am just uneasy about MySQL and am look­ing for an excuse to get away from it. If I stick with MySQL, some­thing like MariaDBexternal_link or Drizzleexternal_link to me is almost more appeal­ing to get away from Oracle’s heavy hand. Both MariaDB and Drizzle are based on or forked from MySQL. Drizzle is doing some inter­est­ing things going off in their own direc­tion where­as MariaDB looks to be more com­pat­i­ble.

PostgreSQL is one of those data­bas­es I have want­ed to use instead of MySQL ever since I start­ed using MySQL, espe­cial­ly since MySQL didn’t sup­port trans­ac­tions. But at that time it was (or was per­ceived as) more dif­fi­cult to con­fig­ure and main­tain. It cer­tain­ly has dif­fer­ent ways of doing things and gen­er­al­ly seems to be more com­plex but that is because it has more capa­bil­i­ties. Documentation for PostgreSQL some­times feels like it is writ­ten for peo­ple who already know what they are doing just need­ing handy reminders and not for peo­ple unfa­mil­iar with PostgreSQL at all.

Now that I am using PostgreSQL, I see it wasn’t at all as dif­fi­cult as I thought but I still haven’t learned enough to feel com­fort­able with every­thing. Using phpp­gad­minexternal_link has made things a bit eas­i­er although the com­mand line tools give me more capa­bil­i­ty. PostgreSQL cer­tain­ly has a lot more lay­ers to work with such as schemas, trig­gers, and views (real ones unlike what MySQL has). And of course, it has its own way of doing SQL at times although much clos­er to the stan­dards than MySQL. Ironically, although I know a lot less about PostgreSQL I already feel more com­fort­able about using it than I do MySQL.

I haven’t done a lot of test­ing with regards to per­for­mance and resource use. I am not as con­cerned about per­for­mance as I am about resource use. My ini­tial tests seem to indi­cate that PostgreSQL uses less RAM to do the same thing despite the fact it actu­al­ly can do a lot more. But that may change as I use it more.

I will con­tin­ue this dis­cus­sion in part 2 as I look at WordPress and make a deci­sion to keep using it and MySQL or switch to some oth­er blog­ging soft­ware that will use PostgreSQL.

2 thoughts on “WordPress and PostgreSQL (part 1)

  1. dendly

    I think your choice to aban­don MySQL will lead to a lot of trou­bles. There are sev­er­al oth­er con­tent man­age­ment sys­tems that also require mysql such as Joomla which I high­ly rec­om­mend over any oth­er CMS — espe­cial­ly over WordPress and Drupal which is hor­ri­ble. Mysql has so much sup­port that you will find that you are lim­it­ed to infe­ri­or prod­ucts. In fact, you will find that some web apps that used to sup­port post­gresql have now aban­doned it because mysql is the supe­ri­or prod­uct.

  2. bill Post author

    I have to agree with you Dendly on your main point. MySQL has a lot of sup­port and there are many more web devel­op­ment tools avail­able which sup­port MySQL than those that also sup­port oth­er RDBMSes.

    I do dis­agree that MySQL is the supe­ri­or prod­uct, it isn’t, it is just the most pop­u­lar.

    I also have to semi-dis­agree with Joomla. I think that will lead me to a new arti­cle regard­ing Joomla and my long like-dis­like con­flict with Joomla.

Leave a Reply