How to install a specific version of PostgreSQL in Red Hat 8?

I’d like to install a specific version of PostgreSQL in RHEL 8 with dnf.
To achieve this I followed the PostgreSQL guide : https://www.postgresql.org/download/linux/redhat/

But actually I can only install the last version (12.9) not the 12.4 (the version I want).
The version is however present in the repository :

https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-8.5-x86_64/

See : https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-8.5-x86_64/

If I list the versions available with dnf :

enter image description here

I can see only 12.9 is available.

But if I show duplicate packages, I can see the version 12.4 :

enter image description here

So is there a way to install this specific version, since it’s present on the reposity ?

Answer

you can always install any version directly from the sources (https://www.postgresql.org/ftp/source/v12.4/ in your example).

Attribution
Source : Link , Question Author : mishka , Answer Author : vrms

Leave a Comment