0

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 ?

mishka
  • 142
  • 1
  • 6
  • Have an specific reason for installl that version? Rember RHEL use the last updated version coz the last version are stable and bugs fixed – Arden Smith Jan 11 '22 at 01:48
  • We want to freeze the version : - to keep the same version for all our clients - to prevent a change of behavior or a mandatory operation to do after update (like reindexing some indexes) – mishka Jan 17 '22 at 15:37

4 Answers4

0

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

vrms
  • 227
  • 4
  • 16
0

I have the same issue here. I need to install version 12.4 and then test the upgrade to 12.9. you can install postgresql 12.4 from source (https://www.postgresql.org/ftp/source/v12.4/) with 3 major steps:

  1. wget source package and extract it
  2. ./config > make > make install
  3. add postgres user and initdb, and then start db I successfully installed postgresql 12.4, however, I had the problem to install extension(postgis)
0

If the package is in the repo you can detail the version like <package-name>-<version>[.<architecture>].

So in this case:

dnf install postgresql12-server-12.4-4PGDG.rhel8
user7138814
  • 101
  • 1
-1

I would recommend installing from AppStream:

yum module list postgresql

yum module install -y postgresql:{ver}

postgres --version

For more information, run through this online lab! https://lab.redhat.com/appstream-manage

ITGuyEric
  • 19
  • 4