[RFC] News Item: KDE PIM 26.04.1 default backend changes to sqlite

Andreas Sturmlechner <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Message-ID <[email protected]>
Title: KDE PIM 26.04.1 default backend changes to sqlite
Author: Andreas Sturmlechner <[email protected]>
Posted: 2026-05-15
Revision: 1
News-Item-Format: 2.0
Display-If-Installed: kde-apps/akonadi


KDE PIM's centralised Akonadi subsystem is using a database for cached data.
For this, three different database backends are supported for a long time.
When multiple USE flags are enabled, kde-apps/akonadi-config ebuild picks
the one with highest priority as default DB backend in akonadiserverrc.

---------!--------------------------------!-----------!-----------
 Backend ! kde-apps/akonadi-config[<use>] ! <=26.04.0 ! >=26.04.1
---------!--------------------------------!-----------!-----------
 QSQLITE ! sqlite                         !     2     !     1
 QMYSQL  ! mysql                          !     1     !     2
 QPSQL   ! postgres                       !     3     !     3
                                          !  (priority, 1 = best)

This means that prior to KDE PIM 26.04.1 (with kde-apps/akonadi-config-0),
mysql, when enabled, took precedence for new KDE PIM setups.


Changes
=======

With kde-apps/akonadi-config-1 we are making sqlite first choice instead.
That in itself will not change existing Akonadi instance settings, which
are stored in home directories.


Reasons
=======

Historically[1], QSQLITE backend was fundamentally broken for KMail workload,
which is why QMYSQL was picked as default early on. Over the years this has
come with its own share of (mostly DB upgrade handling) bugs, but QSQLITE has
only in recent years become viable again through upstream's efforts, which we
have been tracking[2]. Recently, the default was finally changed uptream[3].


User Action Required
====================

In order to implement any backend change on your users' akonadi DB config,
a manual migration step is necessary - in this example, from mysql to sqlite.
It is necessary to have support for both database drivers enabled in
dev-qt/qtbase for this to succeed.

    1) Find out which backend is currently in use:
    
        grep ^Driver ~/.config/akonadi/akonadiserverrc

    2) A quick check that both DB drivers are supported by Qt:
    
        USE="mysql sqlite" emerge -p1 dev-qt/qtbase
    
        If this command indicates a USE flag change, you must at least
        temporarily rebuild dev-qt/qtbase with both old and new enabled.

    3) Migration:

        akonadi-db-migrator --newengine sqlite
    
    The last command will not just migrate the database but also adapt
    akonadiserverrc accordingly.

In order to keep using QMYSQL backend for users' existing Akonadi instances,
ensure that USE=mysql is permanently[4] enabled for kde-apps/akonadi-config
[and dev-qt/qtbase respectively].

In order to keep QMYSQL backend as default choice for new Akonadi instances,
make sure that USE=sqlite is disabled for kde-apps/akonadi-config.

    Remember to run dispatch-conf (preferred) or etc-update to get updated
    configuration files:

        dispatch-conf


[1] https://bugs.gentoo.org/441596
[2] https://bugs.gentoo.org/936102
[3] https://invent.kde.org/pim/akonadi/-/merge_requests/311
[4] https://wiki.gentoo.org/wiki//etc/portage/package.use
signature.asc (application/pgp-signature, 829 B)
-----BEGIN PGP SIGNATURE-----

iQIvBAABCgCZFiEE34gXUSooizdYNDu3S5FW4z0PgBkFAmoCVRIbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRERjg4MTc1MTJBMjg4QjM3NTgzNDNC
Qjc0QjkxNTZFMzNEMEY4MDE5AAoJEEuRVuM9D4AZoaoL/1dQhXzGyA9gL+mWtFfp
5Hpx8n6pTaMKSLk3b2Llj+H6OW35ptDpVUOuH52dwjcdu1XLVrsjMXy3bHzfxyKm
bTFX+Vg1Qt0S1+AxnnqDdksH4/78Rk2D9Ab9VkwQU7FRAMhaevwEJva1f7nbrVRp
XR81lN9DOKMbgxVsfCBKjZmp5LD8hKu5zTb71EdKmPIPhuuCadQ1mUNnOj3neaKP
tFTHKgAuioISIBunfwRIwlvwzLJ0VyEKsmhHhoadL7Da+MRRnbFoeObXPYfgDW6V
/oLfHl6zZZrYpgg5W6a/HKjzqgBZPbMkqPsn8eADarFci02cInmObUWYWQE/5+2D
s2fHSwK7QHk0gy+5ESFLsjLy9HSnt4hN0noDoZUtDcXSFrFkY2DO9ipg1nE3+3p3
ntfCNeCGD9C8IWEtHQxSC0Ch1mEXDTD2fki0X8qZI6gCJgTgfI/37fQVPC6kfI8P
orMBX98EzJ54quW8BE3qC4IAJhGDcXG3Putfq5kWwUIhxw==
=MbLJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.