From a5523a8e26d37a307973a0430d5eaff7f2fb04c6 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 4 Mar 2021 11:26:40 +0100 Subject: [PATCH] Add PostgreSQL upgrade instructions on EL8 --- _includes/manuals/2.4/3.6_upgrade.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/_includes/manuals/2.4/3.6_upgrade.md b/_includes/manuals/2.4/3.6_upgrade.md index 3464950be6..00194d273f 100644 --- a/_includes/manuals/2.4/3.6_upgrade.md +++ b/_includes/manuals/2.4/3.6_upgrade.md @@ -126,6 +126,25 @@ Next upgrade all Foreman packages: {% highlight bash %} dnf upgrade ruby\* foreman\* {% endhighlight %} + +Foreman runs best on PostgreSQL 12 but the default version on EL8 is 10. The installer will try to use version 12 but can't upgrade existing databases. An upgrade can be performed by [switching module streams](https://docs.fedoraproject.org/en-US/modularity/using-modules-switching-streams/). + +First make sure you have version 10 installed: + +{% highlight bash %} +rpm -qv postgresql-server +{% endhighlight %} + +If you're already on 12 or don't have the PostgreSQL server installed, you can continue with step 3. Otherwise upgrade: + +{% highlight bash %} +systemctl stop postgresql.service +dnf module reset postgresql +dnf module install postgresql:12 +dnf install postgresql-upgrade +postgresql-setup --upgrade +systemctl start postgresql.service +{% endhighlight %}