Automatically run pg_upgrade when major PostgreSQL upgrade is detected
Summary: This implements detection of version of the db_data cluster and the currently installed Postgres version (on Linux for now, only), and upgrading the cluster when Postgres major version upgrade is detected. This should make it more comfortable for users to use Akonadi with Postgres since they no longer have to care about Postgres upgrades. The upgrade will fail if we fail to find executables for the previous Postgres server version (the one from which we are upgrading), which may differ between distributions and usually requires an additional package to be installed. The process involves creating a new db cluster using the new version of Postgres, then basically dumping data from the old cluster (that's why we need executables from the previous version) and importing them into the new cluster. Finally, the old and the new clusters are swapped and the old one is removed. Test Plan: Tested on Fedora, upgrading from Postgres 10 to 11 Reviewers: #kde_pim, knauss Reviewed By: #kde_pim, knauss Subscribers: asturmlechner, knauss, kde-pim Tags: #kde_pim Differential Revision: https://phabricator.kde.org/D21154
parent
0cdad4a3
Please register or sign in to comment