Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#103 Official support for MariaDB

open-works-for-me
nobody
Database (7)
5
2012-04-10
2012-02-16
Charles
No

Hola,

I've been seriously questioning my continued use of MySQL ever since Oracle bought Sun, and even more so recently. I'd really like to switch to MariaDB (seems to be the best one of the forks, and the closest to a drop-in replacement)... however, since postfixadmin is my main use of mysql, I'd rather not do this unless/until postfixadmin offically adds support for it.

Are there any existing plans/efforts to do this? From what I've read about MariaDB, it is virtually a drop in replacement for MySQL, so I was hoping it wouldn't be too difficult to add official support for it, then maybe after a certain period, just drop official support for MySQL - unless of course the devs are ok with maintaining them both until such time as they diverge to the point that maintaining them both becomes too much work.

Regardless, many thanks to all who make postfixadmin the best way to maintain a mail server!

Discussion

  • Alexander
    Alexander
    2012-03-04

    I don't think that need to be done something with postfixadmin to be able to work with MariaDB. It's practically drop in replacement. Nothing should be changed in PHP scripts.
    PostfixAdmins table is pretty simple and don't use anything special(triggers, procedure...) as far as I know.
    We already replaced a few DB servers to MariaDB without any issues and get better performance with it.
    Here is an information about compatibility:
    http://kb.askmonty.org/en/mariadb-versus-mysql

    BTW, It would be good to switch to PDO in PHP instead of direct call of mysql's functions.
    In this case it will be possible to use different Database engines without touching actual logic.

     
  • AFAIK MariaDB should just work (even if you will still have to use 'mysql' or 'mysqli' and not 'mariadb' in $CONF[database_type] ;-)

    If something doesn't work with MariaDB, please open a bugreport. If I don't see any bugreport, then we can consider MariaDB as officially supported ;-))

    @alex-j: using $database_abstraction_of_the_day is a topic that comes up regularly, and I have written several quite long mails to the postfixadmin-devel mailinglist where I explained why I don't like the idea. Basically there are two reasons:

    a) I don't see a real advantage over the db_* functions we have - especially with the *Handler classes in SVN trunk, we already have a quite good abstraction.

    b) some special cases most probably won't work with the same queries in $database_abstraction. For example, take the page browser, which is broken for postgresql in trunk - and uses a very interesting[tm] query for MySQL. I doubt any abstraction layer could convert this query to something that also works with postgresql and is still fast. (The query in 2.3.x works with all databases, but is damm slow - we received reports that loading list-virtual can take minutes.)

     
    • status: open --> closed-works-for-me
     
  • Charles
    Charles
    2012-04-10

    Ok, I'll be rolling out a new server (virtualized) in the next few weeks (or 2-3 months at the most), and will report back...

    I'd still like to see the comments in the config files properly reflect this all of this though - meaning, the fact that MariaDB should 'just work', but the DB type still needs to be defined as mysql or mysqli...

     
  • Charles
    Charles
    2012-04-10

    • status: closed-works-for-me --> open-works-for-me