Skip to content

Commit

Permalink
Add PostgreSQL upgrade instructions on EL8
Browse files Browse the repository at this point in the history
Includes a workaround for BZ 1935301 in upgrades. postgresql-upgrade is
unable to deal with data_directory in postgresql.conf. This is added by
puppetlabs/postgresql so pretty much guaranteed to be present.
  • Loading branch information
ekohl committed Mar 11, 2021
1 parent 66dbb01 commit 6998b96
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions _includes/manuals/2.4/3.6_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,27 @@ 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. It is recommended to upgrade by [switching module streams](https://docs.fedoraproject.org/en-US/modularity/using-modules-switching-streams/).

First check which version of PostgreSQL is currently 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
# https://bugzilla.redhat.com/1935301
sed -i '/^data_directory =/d' /var/lib/pgsql/data/postgresql.conf
dnf module reset postgresql
dnf module install postgresql:12
dnf install postgresql-upgrade
postgresql-setup --upgrade
systemctl start postgresql.service
{% endhighlight %}
</div>

<div class="upgrade_os upgrade_os_debian10 upgrade_os_ubuntu1804">
Expand Down

0 comments on commit 6998b96

Please sign in to comment.