Skip to content

Postgresql minor version control #1182

@jefferypalmer

Description

@jefferypalmer

Bug description

The ansible scripts don't seem to have the ability to build the package string necessary for dnf to install a minor version. Minor version control is quite important for production, so a quick question is whether there are OS's that do support minor version control?

I have tried a variety of postgresql_version settings but the issue is that dnf expects the version information to be appended to the end of the package name and not the middle. For example installing postgresql server v17.5-1:

Works (manually)

dnf install postgresql17-server-17.5-1PGDG.rhel9

Fails (autobase ansible)

dnf install postgresql17-17.5-1PGDG.rhel9-server

TASK [vitabaks.autobase.packages : Install PostgreSQL packages] *******************************************************************************************************
failed: [10.x.x.x] (item=postgresql17.5-1) => {"ansible_loop_var": "item", "attempts": 3, "changed": false, "failures": ["No package postgresql17.5-1 available."], "item": "postgresql17.5-1", "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}

I have tried setting a variety of version strings but these fail

postgresql_version: 17.5
postgresql_version: 17.5-1
postgresql_version: 17-17.5-1PGDG.rhel9

Output from Rocky 9.6

# dnf --showduplicates list postgresql17
Last metadata expiration check: 0:04:13 ago on Mon 04 Aug 2025 04:42:06 AM UTC.
Available Packages
postgresql17.x86_64                                                          17.0-1PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.0-2PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.1-1PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.2-1PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.3-1PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.4-1PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.5-1PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.5-2PGDG.rhel9                                                           pgdg17
postgresql17.x86_64                                                          17.5-3PGDG.rhel9                                                           pgdg17

Expected behavior

Postgres minor version control on Rocky 9.6

Steps to reproduce

  1. Use Rocky 9.6
  2. Set postgresql minor version

Installation method

Command line

System info

Rocky Linux 9.6

Additional info

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions