Score:0

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

ng flag

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 ?

Arden Smith avatar
pe flag
Have an specific reason for installl that version? Rember RHEL use the last updated version coz the last version are stable and bugs fixed
ng flag
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)
Score:0
us flag

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
Score:0
bv flag

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)
Score:-1
id flag

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

ng flag
That's not helping me, I still can't install version 12.4 with this (only 12.9 possible).
ITGuyEric avatar
id flag
Is there something preventing you from upgrading your database to a newer version?
Score:-1
de flag

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

ng flag
I'd prefer not to install from source, for evident reasons
vrms avatar
de flag
what is your 'evident' reason @mishka?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.