Bug 507899 - Akonadi-upgrade to postgres 17 fails
Summary: Akonadi-upgrade to postgres 17 fails
Status: REPORTED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (other bugs)
Version First Reported In: 6.4.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-05 13:48 UTC by Axel Braun
Modified: 2025-10-12 19:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Braun 2025-08-05 13:48:32 UTC
updating akonadi from postgresql 16 to 17 fails, as according to the new description in 
https://userbase.kde.org/Akonadi/Postgres_update
 the parameter --data-checksums is now set:

axel@southpole:~> /usr/lib/postgresql17/bin/pg_upgrade -b /usr/lib/postgresql16/bin -B /usr/lib/postgresql17/bin -d $HOME/.local/share/akonadi/db_data_old -D $HOME/.local/share/akonadi/db_data --check
Führe Konsistenzprüfungen durch
-------------------------------
Checking cluster versions                                     ok

der alte Cluster verwendet keine Datenprüfsummen, aber der neue verwendet sie
Fehlgeschlagen, Programm wird beendet


Translation: The old cluster does not use checksums, the new one does.
Aborted

trying to change this:

axel@southpole:~> /usr/lib/postgresql16/bin/pg_checksums --verbose --enable --pgdata=$HOME/.local/share/akonadi/db_data_16_checksum
pg_checksums: error: cluster is not compatible with this version of pg_checksums

And now?

Operating System: openSUSE Leap 16.0
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.1
Comment 1 Axel Braun 2025-10-03 05:25:51 UTC
same issue on upgrade to pg18
note that --enable-checksums is now default setting of initdb, so if you want to see your mails you need to use --no-enable-checksums
Comment 2 Axel Braun 2025-10-03 05:44:43 UTC
PS: enabling checksums on the postgres18 cluster after conversion works at least
Comment 3 Allen Winter 2025-10-03 10:22:25 UTC
Axel,

(not that I know anything about Postgres) 
do you have any thoughts on what needs to be done in akonadi itself?

looking in the source code, I see references to the program `pg_upgrade` but no hits for "--check"
I'm guessing you need us to change the command line invocation of `pg_upgrade` but I don't know what exactly.
Comment 4 Axel Braun 2025-10-12 17:43:35 UTC
Hello Allen,

(In reply to Allen Winter from comment #3)
> (not that I know anything about Postgres) 
> do you have any thoughts on what needs to be done in akonadi itself?

Actually, I'm not a postgres expert either, just finding my way around..
 
> looking in the source code, I see references to the program `pg_upgrade` but
> no hits for "--check"
> I'm guessing you need us to change the command line invocation of
> `pg_upgrade` but I don't know what exactly.

I'm not even sure that akonadi can do something on that. Except maybe adding a hint regarding the checksums to the wiki (User Pat1 added the checksums already in Nov 2023 ).
(In that context, just noticed that my bugs.k.o user does not work in the wiki, but thats a different action)
Comment 5 Allen Winter 2025-10-12 19:53:55 UTC
ok,
once we have the wiki updated we can resolve this bug.