If postgresql is installed in version 15 in UCS 5.0 and the system is updated to 5.2, postgres print this warning $ univention-pkgdb-scan WARNUNG: Version von Sortierfolge für Datenbank »pkgdb« stimmt nicht überein DETAIL: Die Datenbank wurde mit Sortierfolgenversion 2.28 erzeugt, aber das Betriebssystem hat Version 2.36. HINT: Bauen Sie alle Objekte in dieser Datenbank, die die Standardsortierfolge verwenden, neu und führen Sie ALTER DATABASE pkgdb REFRESH COLLATION VERSION aus, oder bauen Sie PostgreSQL mit der richtigen Bibliotheksversion. In this case it is univention-pkgdb-scan which wants to update some data, but the same warning appears in the keycloak logs, so it doesn't matter which database/service is used. Seems to be a problem with the combination of postgresql-15 and libc6 (libc6 is updated fro 2.28 to 2.36 during the upgrade) We guess that all the databases need to be updated in this case: - https://www.postgresql.org/docs/15/sql-altercollation.html#SQL-ALTERCOLLATION-NOTES - https://forum.greenbone.net/t/the-database-was-created-using-collation-version-2-35-but-the-operating-system-provides-version-2-36/13562/4 Currently we don't know of any negative impacts of this.
As noted at the gitlab issue, we need to describe the re-indexing steps required to accommodate for the libc changes in collation. I guess we can simply extend https://help.univention.com/t/22162 which has been created for Bug #56540.
Workaround (and possibly also the solution): Run `su postgres -c 'psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;"'`
Nah, that's faking it. You need to re-index first!! https://www.postgresql.org/docs/15/sql-altercollation.html#SQL-ALTERCOLLATION-NOTES says: > When this happens, all objects depending on the collation should be rebuilt, for example, using REINDEX. When that is done, the collation version can be refreshed using the command ALTER COLLATION ... REFRESH VERSION. This will update the system catalog to record the current collation version and will make the warning go away. Note that this does not actually check whether all affected objects have been rebuilt correctly.
univention-updater (17.0.34) 36d51f90086c | Bug #57795: update postgres collation in postup.sh The postup.sh script for 5.2-0 now checks if univention-postgresql15 is installed, and in case it is, it will iterate over all databases checking if their collation version needs to be refreshed
Verified: * Code review * Test with postgresql-15 installed in 5.0-10 before update to 5.2-0 * Test with no postgresql installed at all I installed the postup.sh and signed on mirror/ftp/dists/ucs520. Felix and I did a test-update with data in psql.
Moving to close, changes have been released to mirror/ftp