sudo yum module list postgresql
Application streams are new to RHEL 8 and provide access to the latest tools, languages and libraries, without affecting core system components. This capability gives users access to multiple versions of packages, with a known period of support. These application streams, usually provided as modules, can be thought of as package groups that represent an application, a set of tools, or runtime languages.
As root, use yum
to see what streams are available, for PostgreSQL:
sudo yum module list postgresql
There are three versions of postgresql available as modules in the Application Stream, versions 9.6, 10 and 12.
PostgreSQL version 10 is set as the default, meaning if someone installed postgresql with no specific options or arguments, version 10 would be the one installed.
To support the web application deployed on this machine, install postgresql version 9.6:
sudo yum -y module install postgresql:9.6
After the installation is complete, verify that postgresql version 9.6 is installed on the system.
sudo yum module list postgresql
Notice that version 9.6 is now marked as [e]nabled under the Stream column and is flagged as [i]nstalled in the Profiles column of the listing for postgresql.
Finally, run the postgres command to inspect the version it reports:
postgres --version
Now imagine an update to a web application running on this system requires features available in postgresql version 10. To accomplish this you will ultimately remove postgresql 9.6 and install postgresql 10, however, there are some additional Application Stream settings to apply to the system configuration as well.
To start off with, remove PostgreSQL 9.6:
sudo yum -y module remove postgresql:9.6
Take a look at the Application Stream information for the machine to validate the removal:
sudo yum module list postgresql
Verify that postgresql version 9.6 is no longer flagged as [i]nstalled.
Prior to installing an available newer version of postgresql, first disable the older (now removed) version of the software:
sudo yum -y module disable postgresql:9.6
Likewise, while the newer version is the default, it should be enabled:
sudo yum -y module enable postgresql:10
Take a look at the Application Stream information to verify that postgresql version 10 is now the enabled version:
sudo yum module list postgresql
The [e]nabled flag is now present for postgresql version 10.
Now that the Postgres version 10 stream is enabled, install it on the system:
sudo yum -y module install postgresql:10
The Postgres 10 stream should now be listed as [i]nstalled:
sudo yum module list postgresql
Finally, check the version reported by the postgres command:
postgres --version
Lastly, inspect all software managed as application streams:
sudo yum module list
Domain |
![]() |
|
Workshop | ||
Student ID |