Running Multiple PostgreSQL Versions on RHEL with Application Streams
RHEL's Application Streams lets you install and switch between PostgreSQL 12, 13, and 14 without affecting the system default—here's how it works and when to avoid it.
18 May 2026, 19:33 UTC

Running Multiple PostgreSQL Versions on RHEL with Application Streams
\nWhen a production application mandates PostgreSQL 14 but your RHEL system installs PostgreSQL 12 by default, you face a version-choice problem heavier than a simple package upgrade. Containers add orchestration overhead, and compiling from source risks diverging from security updates. Red Hat's Application Streams feature addresses this by letting you enable specific major versions through DNF modules, keeping the system default intact while providing application-accessible alternatives.
\n\nHow Application Streams Works
\nApplication Streams packages software as RPM modules each defined by a stream the version a profile the installation variant and context compatibility metadata. On RHEL 8 and 9 you can enable PostgreSQL 14 for instance without uninstalling or breaking the pre-installed 12. The system PostgreSQL at the default path remains untouched and your application can reference the stream-installed version via path or module activation.
\n\nEnabling PostgreSQL 14 on RHEL
\nTo enable PostgreSQL 14 first check what's available:
\n$ dnf module list postgresql Red Hat Enterprise Linux 9.2 AppStream x86_64 Name Stream Profiles Summary postgresql 12 default [d] PostgreSQL database system 13 default PostgreSQL database system 14 default [e] PostgreSQL database system\nThe [e] marker shows the stream is enabled; [d] denotes default. To enable stream 14 and install it:
\nsudo dnf module enable postgresql:14 sudo dnf install postgresql14\nRequired permissions root or sudo. Meaningful placeholders the module name and stream tag postgresql:14. Expected checks after installation postgresql14 --version should report 14.x while postgresql --version still reports the system default 12.x. A practical verification step is running dnf module list postgresql again to confirm the [e] marker on stream 14.
\n\nTrade-offs and Limitations
\nApplication Streams is not a silver bullet. Three constraints shape when it makes sense to use it: Subscription gate Access is tied to a valid RHEL subscription. Systems without entitlements cannot enable streams even if the packages exist on installation media. Version availability varies by release RHEL 8.9 may ship PostgreSQL 12 and 13 streams while RHEL 9.2 adds 14 and 15. Checking dnf module list on your exact minor version is essential. Dependency complexity Mixing packages from different major streams in a single application can produce unsatisfiable dependency chains especially when client libraries e g libpq differ between versions. In containerized environments shared base images may already enable a stream and switching it can alter runtime behavior unexpectedly.
\n\nPractical Verification After Enabling
\nAfter running the enable and install commands confirm the setup:
\n- postgresql14 --version outputs PostgreSQL 14.10
- postgresql --version outputs PostgreSQL 12.16 system default unchanged
- dnf module list postgresql shows stream 14 with [e] enabled
If you need to reverse the change dnf module reset postgresql removes the stream enablement and reverts module state. Note this action changes system state it uninstalls the stream-installed packages and reinstates the default so plan accordingly.
\n\nActionable Next Steps
\n- On your RHEL system run dnf module list postgresql and note which streams are available for your minor release
- Test stream enabling in a non-production environment or a disposable container first
- Document the enabled stream and your application version requirement for reproducible deployments
- When decommissioning use dnf module reset postgresql to cleanly retire the stream
Application Streams transforms version management from a system-wide commitment into an application-level choice if your RHEL subscription and minor release support the streams you need.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.