Selecting a PostgreSQL Module Stream in Rocky Linux 9
Guide to choosing a PostgreSQL module stream in Rocky Linux 9, comparing the default postgresql:13 and postgresql:15 streams, with steps to enable and verify PostgreSQL 15.
16 Sept 2025, 00:17 UTC

Decision and constraints
You need to run PostgreSQL on Rocky Linux 9 and prefer to stay within the default AppStream module system without adding third‑party repositories. The decision is which PostgreSQL module stream to enable. Constraints to consider are:
- Application compatibility – some applications require specific SQL features, extensions, or behavior.
- Required PostgreSQL capabilities – e.g., parallel query improvements, logical replication, JSONB/SQL‑JSON enhancements.
- Support lifecycle – you want a version that receives security updates for the planned deployment period.
- Operational simplicity – using the default stream reduces the risk of unintended version switches in automation.
Supported PostgreSQL module streams in Rocky Linux 9
| Stream | PostgreSQL version | Default in Rocky Linux 9 | Upstream support end | Typical use case |
|---|---|---|---|---|
| postgresql:13 | 13 | Yes (default) | 2025‑11‑13 | General purpose workloads; solid performance and feature set. |
| postgresql:15 | 15 | Available via dnf module enable postgresql:15 | 2027‑11‑11 | Workloads benefiting from latest planner enhancements and JSONB/SQL‑JSON improvements. |
Trade‑offs
The default stream (postgresql:13) provides the longest guaranteed stability within Rocky Linux 9’s support window and includes performance improvements to parallel query and logical replication that arrived in earlier releases. It lacks some of the newer JSONB/table‑function features introduced in PostgreSQL 15.
Enabling postgresql:15 gives access to the latest planner improvements, additional parallel query capabilities, and JSONB/SQL‑JSON enhancements (e.g., JSONB table functions, improved path expressions). Its upstream support ends later than PostgreSQL 13, but you should verify that your applications are compatible with the new version before adopting it in production.
Concrete implementation – enabling PostgreSQL 15
If you decide PostgreSQL 15 meets your feature and support requirements, follow these steps. All commands require root or sudo privileges.
- Reset any existing PostgreSQL module state to avoid conflicts:
sudo dnf module reset postgresql -y - Enable the postgresql:15 stream:
sudo dnf module enable postgresql:15 -y - Install the server package from the enabled stream:
sudo dnf install @postgresql:15 -y - Start and enable the PostgreSQL service:
sudo systemctl enable --now postgresql - Verify that the service is active:
Look forsudo systemctl status postgresqlactive (running)in the output. - Check the installed version:
The output should begin withsudo -u postgres psql -c "SELECT version();"PostgreSQL 15. - Review the PostgreSQL log for startup errors:
or inspectsudo journalctl -u postgresql/var/log/postgresql/postgresql-*.log.
Validation and rollback considerations
Validation is complete when the service is running, the version query returns the expected string, and the log shows no fatal errors. If you need to revert to the default stream, you can reset the module and reinstall:
sudo dnf module reset postgresql -y
sudo dnf module enable postgresql:13 -y
sudo dnf install @postgresql:13 -y
sudo systemctl restart postgresql
Note that changing the module stream alters the default package selection for future dnf install or dnf upgrade operations. Update any automation scripts or configuration management tools to reflect the chosen stream to avoid unintended version switches.
Limitations
These instructions apply specifically to Rocky Linux 9. Rocky Linux 8 uses a different set of module streams, and the commands may not work unchanged. The support dates listed are upstream end‑of‑life dates; Rocky Linux may provide extended security patches through its own errata, but you should consult the Rocky Linux release notes for the exact support window.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.